Title: loading external swf as viewcomponent Post by: 4ucai on November 02, 2011, 08:16:37 Hi, im still learning how to get around the PureMVC framework.
Im a bit confused as to how i should load external swf(basically they are movieclips which contains buttons, sprites, etc.). I separated my single project(all movieclips,etc. in 1 big .fla file) into modules(e.g. editTools,commonTools). I did these things so far.. 1. In my applicationfacade override protected function initializeController():void { 2.In on StartupCommand.aspublic class StartupCommand extends SimpleCommand implements ICommand { Btw, i have a ToolbarProxy which i think should handle the loading of swf public class ToolbarProxy extends Proxy implements IProxy { And the ToolbarVOpublic class ToolbarVO More Power & Best Regards Title: Re: loading external swf as viewcomponent Post by: puremvc on November 02, 2011, 09:52:46 It's not a good idea to mix View tier classes in your Proxies and VOs. Value Objects are usually intended to represent and persist your domain model; the data your app works with. Step back from your application and consider what actual persistable data it works with. Write VOs to represent that data so all tiers of the app can work with it. Write Proxies to persist and retrieve those VOs and make them available to the system.
Use a Mediator to load the module and keep the reference. This stretches the Mediator's normal responsibilities a bit but not as much as having a Proxy be involved in View related business. Mediators are usually passed View Component instances to be mediated, but they may also create the instances themselves or load the instance. They may need to consult a ConfigProxy that gives them the info about where to load the module from (it would've previously loaded a configuration file). Also if you intend to have PureMVC code in those modules, be sure to use the MultiCore version rather than the Standard version. Title: Re: loading external swf as viewcomponent Post by: 4ucai on November 02, 2011, 10:30:46 thnx for the replay appreciate it very much..i will take a look at multi core
|