Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Print
Author Topic: Best practice for adding the aplication to the stage in AS3 only projects  (Read 6677 times)
gregbown
Jr. Member
**
Posts: 16


View Profile Email
« 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://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/ as in HelloFlash 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.
« Last Edit: July 31, 2008, 10:14:27 by gregbown » Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 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>
Logged
Pages: [1]
Print