/ Published in: Other
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/** * Base PureMVC Project */ package { import org.puremvc.as3.interfaces.IFacade; import org.puremvc.as3.patterns.facade.Facade; import controller.*; /** * Simple ApplicationFacade for PureMVC Structured Project */ public class ApplicationFacade extends Facade implements IFacade { /** * Notification name constants */ public static const STARTUP:String = "startup"; /** * Singleton ApplicationFacade Factory Method */ public static function getInstance(): ApplicationFacade { if (instance == null) { instance = new ApplicationFacade( ); } return instance as ApplicationFacade; } /** * Broadcast the STARTUP Notification */ public function startup(app:Object):void { sendNotification( STARTUP, app ); } /** * Register Commands with the Controller */ override protected function initializeController():void { super.initializeController(); registerCommand(STARTUP, StartupCommand); } } }