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: Q: Loading external SWF's, MovieClip Classes and Mediators  (Read 7821 times)
eco_bach
Courseware Beta
Sr. Member
***
Posts: 81


View Profile Email
« on: September 15, 2008, 10:04:19 »

Trying to get a basic demo working.
I'm loading external swf's , each of which is associated with the same MovieClip class.

I have an main Application Mediator and a 'SWFMediator' which is only related to these swf's that are loaded.

Where do I put the actual logic to load these external swf's?


Normally, in my MVC work all state and loading preloading logic is in the model.
Can someone give me a quick example?
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 on: September 15, 2008, 01:54:14 »

IMHO loaded swfs are not part of the domain model, which represents data not the assets used to compose the view.

This question was recently raised in the MultiCore forum, and I explained my point of view there. See this post: http://forums.puremvc.org/index.php?topic=653.0

That said, the latest version of the StartupManager utility will support loading of assets: http://trac.puremvc.org/Utility_AS3_StartupManager

You can see an example in AS2 of loading SWFs in the Balloonatroid game: http://trac.puremvc.org/Demo_AS2_FlashLite_Balloonatroid

And there is a new AssetLoader utility that you can read about here: http://forums.puremvc.org/index.php?topic=521.0

-=Cliff>
Logged
eco_bach
Courseware Beta
Sr. Member
***
Posts: 81


View Profile Email
« Reply #2 on: September 15, 2008, 04:35:53 »

Ok,thanks Cliff

I noticed in the AS2 Balloontroid demo that the swf loading logic is contained in the Controller (LoadLevelMovieCommand)
with the actual swf name retrieved from the Model (GameHistoryProxy)
Is there any reason I couldn't just update that same logic for AS3?
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #3 on: September 16, 2008, 04:44:42 »

Should work fine.

-=Cliff>
Logged
Pages: [1]
Print