• Home
  • Contact
  • Careers
  • Socialize With Us:
  • Send us Mail
  • Follow us on Twitter
  • Join our Facebook Group
  • /
  • Linkedin
  • /
  • Vimeo Videos
  • /
  • Youtube
  • /
  • RSS Feed
  • Search Site

  • About UsAwards & Bio
  • PortfolioOur Latest Work
  • TrainingTips & Tutorials
  • BlogGreat Articles

You are here: Home / Tag: AS3

Tag Archive for: AS3

ActionScript 3.0 WordPress Plugin

Category: Quick Tips     |     Tags: AS3, WordPress

Managing a blog about programming requires code snippets in the articles. I wanted a great plugin that would show ActionScript 3.0 (and other languages) with colored text, line numbering, and easy ‘copy text’ functionality.

The Syntax Highlighter plugin for WordPress does this well and is easy to add.

Example Code

{
	//--------------------------------------
	//  Imports
	//--------------------------------------

	//--------------------------------------
	//  Class
	//--------------------------------------
	public class Sample
	{

		[Bindable]
		protected var _sample : String;

		public function Sample ()
		{
			_sample = "Hello World";
		}

	}

}

Output Code

package classes
{
	//--------------------------------------
	//  Imports
	//--------------------------------------

	//--------------------------------------
	//  Class
	//--------------------------------------
	public class Sample
	{

		[Bindable]
		protected var _sample : String;

		public function Sample ()
		{
			_sample = "Hello World";
		}

	}

}

AS3-Signals Introduction

Category: Full Tutorials     |     Tags: AS3

What is AS3-Signals?

AS3-Signals (or ‘signals’ for short) is a proven alternative to the native AS3 event system.

Watch Slideshow



Comparison

Syntax
You can see that only line 4 is different.

Flash Events

//CREATE
_person = new Person("Sam");
//LISTEN
_person.addEventListener(PersonEvent.GREETED, _onPersonGreeted);
//CALL
_person.greet("Hello!");

AS3-Signals

//CREATE
_robot = new Robot("Robot");
//LISTEN
_robot.signal.add(_onRobotSignalGreeted);
//CALL
_robot.greet("It is me, the Robot!");

What about the speed of AS3-Signals vs Events?

See this image from Ross Gerbasi showing a comparison in milliseconds (lower # is better/faster).

AS3-Signals and Robotlegs

I am a big fan of the Robotlegs framework for AS3. I’ve written about it many times. AS3-Signals is a completely separate project, but WOW these two play really nice together. In my series of custom project templates I created a specific Robotlegs w/ AS3-Signals Template. On a recent client project I chose Robotlegs and added in the optional AS3-Signals project.

Next Steps

  • Checkout the proof that AS3-Signals are FASTER than events!
  • Read this good article and code on AS3-Signals for Robotlegs.
  • See this nice overview of AS3-Signals
  • Checkout the HD Tutorial Video and full source code for this post (See ‘Member Resources’ below).

Member Resources

'Free Member'-Only Content

You must be a 'Free Member' to see this content. With your access you will enjoy members-only content like this, HD video tutorials, and access to complete source code.

Ready To Join?
  • Sign up for 'Free Member' level now. Its free!
  • Sign up for 'Paid Member' level to enjoy much, much more! (Invite Only)
Already A Free Member?
  • Log in and enjoy!

The Scoreoid AS3 SDK

Category: Source Code     |     Tags: API, AS3

For a recent client Flash game project I needed a highscore table to be shown in-game and in-html outside of the game experience. I considered buy vs build and decided on find a great solution online.

There are a few contenders out there offering high-score tables and other things for Flash developers. Some are cost money. Most are free.

So what is Scoreoid?

As CasualConnect says – Scoreoid is a non-restrictive, reliable and easy to use gaming platform designed to handle scoring, leaderboards and game management, including advanced functions for multi-platform games such as platform content awareness to advanced player management, developed by game developers for game developers.

Scoreoid’s goal is to handle scoring and leaderboard functionality offering plenty of features to make games better; shortening game development time and costs, and giving developers time to work on their games.

What makes Scoreoid unique?

Unlike similar solutions, Scoreoid is focused on providing game developers in game features to help improve their game titles and at the same time focusing on giving game developer’s more time to work on their game. Scoreoid is also truly cross platform: with Scoreoid’s Open Web API there is no need to download SDK’s, no waiting for updates, and yes, Scoreoid works on every platform.

1. Easily create saved games
2. Create advanced leaderboards
3. Player management and in game notifications

Overall its really great. Scoreoid’s marketing is proud it has no download. It *is* cool that it is ‘language independent’ (independent from AS3 vs JavaScript vs Objective C++, etc…) however any project that uses it, will require quite a bit of boiler plate (boring code) just to get it into your game. Any scalable implementation of their framework would require developers (per platform) to create an SDK of classes and patters to use the API.

My Philosophy of API Design

  • Easy to learn -  Intuitive, readable, with good examples & documentation
  • Easy to use – Single entry point, KISS, adopts common standards, & has its own consistent language
  • Hard to misuse – Explicit error message suggesting parameters values & strong typing
  • Audience-appropriate / Sufficiently Powerful – Meet current needs and be (invisibly?) flexible for the future

My Scoreoid AS3 SDK

As the first comment below states, the terms ‘SDK’ and ‘API’ can be confused and unclear. I chose to call my work an ‘SDK’ in that it is a closed chunk of code that is language specific (AS3) to access Scoreoid’s server-side ‘API’.

Strong Typing

The SDK is meant to be a vertical slice representing 100% of a subset of the Scoreoid API. There is a method to initialize, to make the request, a strong typed request object, a response event (success and failure). Its 100%, EXCEPT I was thinking to make a strong object “also” for the response (this is not done, it stays a json/xml object depending on the request parameters). I use a custom implementation of ‘AS3 Enums’ to further this goal. Enums do not natively exist in AS3.

Snippet from My Scoreoid AS3 SDK


//INITIALIZE
Scoreoid.initialize(Configuration.SCOREOID_API_KEY, Configuration.SCOREOID_GAME_ID, Response.JASON);

//LISTEN TO REQUEST'S RESPONSE
Scoreoid.addEventListener(ScoreoidEvent.GET_SCORES, onGetScores );
Scoreoid.addEventListener(ScoreoidEvent.GET_SCORES_COMPLETE, onGetScoresComplete );
Scoreoid.addEventListener(ScoreoidEvent.GET_SCORES_ERROR, onGetScoresError );

//CREATE REQUEST - CONSTRUCTOR ACCEPTS ONLY THE REQUEST'S REQUIRED PARAMETERS
var getScoresRequest : GetScoresRequest = new GetScoresRequest();

//ADD OPTIONAL PARAMETERS
getScoresRequest.order_by = OrderBy.DATE;
getScoresRequest.order    = Order.ASCENDING; //asc or desc
getScoresRequest.limit    = "";

//DONT' SET A START DATE
//BUT DO SET END DATE TO EXACTLY NOW
//getScoresRequest.start_date = new Date();
getScoresRequest.end_date     = new Date();

getScoresRequest.platform   = "";
getScoresRequest.difficulty = 0;

//SEND REQUEST
Scoreoid.getScores(getScoresRequest);

It rocks!

Next Steps

  • Leave comments below. What do you think is great? What do you think is horrible?

Member Resources

'Free Member'-Only Content

You must be a 'Free Member' to see this content. With your access you will enjoy members-only content like this, HD video tutorials, and access to complete source code.

Ready To Join?
  • Sign up for 'Free Member' level now. Its free!
  • Sign up for 'Paid Member' level to enjoy much, much more! (Invite Only)
Already A Free Member?
  • Log in and enjoy!

Add Preloader To a 1-swf AS3-Only Project

Category: Quick Tips     |     Tags: AS3

For a recent project, I had the need for a swf to ‘load itself’. This is challenging in an AS3-Only Project because all code and compile-time assets are baked in, and baked-in to ‘frame 1′ of the application. Flash can’t show ANYTHING until all filesize for frame1 is loaded.

Solution? – The (un)documented Frame Metadata Tag. Thanks to Keith Peters’ bit-101 for background info. I’ve created a great demo that is simple to follow.

FYI – This is basically how Flex works, showing a preloader before it loads (in a 1-swf setup).

UPDATE

If you want your ‘SystemManager’ class in this demo to be more configurable. Consider using ‘Custom Compiler Arguments’. See this post.

Next Steps

  • Checkout the sourcecode (See ‘Member Resources’ below) for a simple example.

Member Resources

'Free Member'-Only Content

You must be a 'Free Member' to see this content. With your access you will enjoy members-only content like this, HD video tutorials, and access to complete source code.

Ready To Join?
  • Sign up for 'Free Member' level now. Its free!
  • Sign up for 'Paid Member' level to enjoy much, much more! (Invite Only)
Already A Free Member?
  • Log in and enjoy!

Using Namespaces in ActionScript 3.0 (AS3)

Category: Quick Tips     |     Tags: AS3

Namespaces are seldom used by AS3 development teams. They are useful in many cases. In this demo I define two classes which access the same subclass “Mediator.” When using the autocomplete/intellisense from Flex Builder to introspect the methods within Mediator we see a unique list depending on what custom namespace is used. Imagine helping your developers to see which public methods they should be using depending on what class they are coding in.

Next Steps

  • Don’t understand me? Don’t blame you. It is crazy! You really need to see the example (See ‘Member Resources’ below).

Member Resources

'Free Member'-Only Content

You must be a 'Free Member' to see this content. With your access you will enjoy members-only content like this, HD video tutorials, and access to complete source code.

Ready To Join?
  • Sign up for 'Free Member' level now. Its free!
  • Sign up for 'Paid Member' level to enjoy much, much more! (Invite Only)
Already A Free Member?
  • Log in and enjoy!

Protected: WLM Samples

Category: Quick Tips     |     Tags: AS3

This post is password protected. To view it please enter your password below:

Page 2 of 212

Free Member Login

You are not currently logged in.






» Register
» Lost your Password?

Support Our Sponsors

Category

  • Industry News
  • Standards & Best Practices
  • Full Tutorials
  • RMC News
  • Events

Tag

3D AIR API AS3 AS3.5 Business Debugging Experimental Flash Flex Games HTML5 Java Loom Mobile Optimization Project Planning PushButtonEngine Robotlegs Smash WordPress WordPress Plugin

Brazilean Developers

  • Abendita.com
  • dclick.com.br
  • dm9.com.br
  • Fellyph Cintra
  • IgorCosta.org
  • MonadaSolucoes.com.br
  • PossibleWorldwide.com.br
  • Unit9.com

Developers

  • Adobe Blogs
  • Ben Forta
  • Colin Moock
  • Enrique Duvos
  • Flash Mobile Blog
  • Jess Freeman
  • Kevin Hoyt
  • Lee Brimelow
  • Paul Trani
  • Quasimondo
  • Renaun Erickson
  • Ryan Stewart

Free Assets

  • Free Sounds
  • HasGrafics

HTML5 Games

  • Closure JS Library
  • Eloquent JS Manual
  • Game Framework – CraftyJS
  • Game Framework – EaselJS

Italian Developers

  • alchimedia.com
  • corlan.org/
  • creativesource.it
  • dimix.it
  • fabiobiondi.com
  • gnstudio.com
  • Interpreting-tech.com/bemobile/
  • leonardorisuleo.info
  • lucamascaro.info
  • mart3.org
  • mxml.it
  • nxn.it
  • pirosoft.it
  • Preload.it
  • sonnati.wordpress.com/
  • webgriffe.com

Products

  • Adobe.com
  • Amazon Kindle E-Reader
  • ElectroServer
  • F*CSS
  • Flash Development Toolkit (FDT)
  • O'Reilly PureMVC Book
  • Samsung Galaxy Tablet
  • Unity3D

RMC

  • RMC Consulting

Spanish Developers

  • Flash Adictos
  • HTML Cinqo
  • Tutoriales Flash

Tutorial

  • Active Tuts
  • AS3-to-Unity3D Training Videos
  • Doing 2D in Unity3D
  • Learning C#
  • Unity3D Tutorials

Unity3D Games

  • AS3-to-Unity3D Training Videos
  • Doing 2D in Unity3D
  • Learning C#
  • Matt Eley's Blog
  • Unity3D
  • Unity3D Tools
  • Unity3D Tutorials

I Am Great!

   

Latest Portfolio

  • Live Media Steaming ApplicationMay 20, 2013, 5:06 am
  • Museum Kiosk Touch ScreenNovember 15, 2012, 9:00 pm
  • Happy Birthday Mobile AppMarch 14, 2012, 5:55 pm
  • Official Robotlegs MVCS DiagramFebruary 24, 2012, 1:36 am

Latest News

  • Intro to Loom Game EngineMay 19, 2013, 6:48 am
  • Cross Platform Mobile: Free TalkDecember 21, 2012, 7:14 am
  • Cross Platform Mobile: Premium TrainingDecember 20, 2012, 7:41 am
  • Must-Have Non-Functional RequirementsDecember 14, 2012, 4:05 am

Latest Tweets (@srivello)

  • 3 hours into my Centipede clone using #2DToolkit for #Unity3D http://t.co/5yWsMQvHEU
  • @pixelplacement I've seen 'iTween Parameter Code Hinting' but anyone done a completely strong-typed (no hash) version of iTween?
  • @pixelplacement Great work on iTween!!! Thanks.
  • So much more excited for next XBox than PS4. 3 hours 'till official reveal!

© Copyright 2006 - 2013 - Rivello Multimedia Consulting - Flash / HTML5 / Unity3D Game And App Development With Tutorials