Skip to content

Instantly share code, notes, and snippets.

@netoleal
Created October 4, 2011 18:46
Show Gist options
  • Save netoleal/1262444 to your computer and use it in GitHub Desktop.
Save netoleal/1262444 to your computer and use it in GitHub Desktop.
Exemplo CommandsDispatcher
import asf.core.commands.CommandsDispatcher;
CommandsDispatcher.broadcastCommand( "someEvent" );
CommandsDispatcher.broadcastCommand( "otherEvent", "some param to pass" );
import asf.core.commands.CommandsDispatcher;
CommandsDispatcher.pushFunction( "someEvent", callbackListener1 );
CommandsDispatcher.pushFunction( "otherEvent", callbackListener2 );
function callbackListener1( ):void
{
trace( "Got it!" );
}
function callbackListener2( param:String ):void
{
trace( "Got it!", param );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment