Created
February 24, 2011 17:57
-
-
Save rafaelrinaldi/842556 to your computer and use it in GitHub Desktop.
Notify a new entry to an IEventDispatcher instance.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package tea.util | |
{ | |
import flash.events.Event; | |
import flash.events.IEventDispatcher; | |
public function dispatch( p_dispatcher : IEventDispatcher, p_event : Object ) : void | |
{ | |
if(p_event is String) { | |
p_dispatcher.dispatchEvent(new Event(p_event)); | |
} else if(p_event.hasOwnProperty("clone")) { | |
p_dispatcher.dispatchEvent(p_event.clone()); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment