Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package ca.autotrader.mediators
- {
- import flash.events.Event;
- import flash.events.EventDispatcher;
- /**
- * @author Jay Moretti
- *
- * Copyright - Jay Moretti - 2010
- *
- * ca.autotrader.mediators
- */
- public class EventMediator
- {
- private static var dispatcher : EventDispatcher = new EventDispatcher();
- public static function addEventListener(p_type : String, p_listener : Function, p_useCapture : Boolean = false, p_priority : int = 0, p_useWeakReference : Boolean = false) : void {
- dispatcher.addEventListener(p_type, p_listener, p_useCapture, p_priority, p_useWeakReference);
- }
- public static function removeEventListener(p_type : String, p_listener : Function, p_useCapture : Boolean = false, p_priority : int = 0, p_useWeakReference : Boolean = false) : void {
- dispatcher.removeEventListener(p_type, p_listener);
- }
- public static function dispatchEvent(p_event : Event) : void {
- dispatcher.dispatchEvent(p_event);
- }
- }
- }
Add Comment
Please, Sign In to add comment