PureMVC Architects Lounge

Announcements and General Discussion => Getting Started => Topic started by: gregbown on July 30, 2008, 04:16:10



Title: Best practice for adding the aplication to the stage in AS3 only projects
Post by: gregbown on July 30, 2008, 04:16:10
What is the best practice for adding the main application to the stage?  I have been working on a pure AS3 PureMVC video player and I see two very diferent methods of adding the player to the stage.  The most common method http://etc.joshspoon.com/2008/02/13/how-to-create-a-puremvc-app-with-actionscript-3/ (http://etc.joshspoon.com/2008/02/13/how-to-create-a-puremvc-app-with-actionscript-3/)  http://www.nutrixinteractive.com/blog/?p=85 (http://www.nutrixinteractive.com/blog/?p=85) in pure as3 projects I have seen is to add the component to the stage within the main class that calls ApplicationFacade.getInstance().startup( this.stage );.  The other method is http://hubflanger.com/building-a-flash-site-using-puremvc/ (http://hubflanger.com/building-a-flash-site-using-puremvc/) as in HelloFlash http://puremvc.org/component/option,com_wrapper/Itemid,144/ (http://puremvc.org/component/option,com_wrapper/Itemid,144/) where the object to be added to the stage is defined within a component class and added to the stage by the StageMediator.


Title: Re: Best practice for adding the aplication to the stage in AS3 only projects
Post by: puremvc on July 30, 2008, 05:41:21
There is definitely more than one way to do this. Either way you've mentioned here is ok.

-=Cliff>