Skip to content

Instantly share code, notes, and snippets.

@swiz
Created March 28, 2010 19:50
Show Gist options
  • Save swiz/346983 to your computer and use it in GitHub Desktop.
Save swiz/346983 to your computer and use it in GitHub Desktop.
Code samples for Event Handling wiki page.
[Mediate( event="com.foo.events.UserEvent.ADD_USER" )]
public function mediateAddUserEvent( event:UserEvent ):void
{
// do stuff
}
[Mediate( event="UserEvent.ADD_USER" )]
public function mediateAddUserEvent():void
{
// do stuff
}
[Mediate( event="UserEvent.ADD_USER" )]
public function mediateAddUserEvent( event:UserEvent ):void
{
// do stuff
}
[Mediate( event="addUser" )]
public function mediateAddUserEvent( event:UserEvent ):void
{
// do stuff
}
[Mediate( event="UserEvent.ADD_USER", properties="user" )]
public function addUser( user:User ):void
{
// do stuff
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment