Keith Peters has posted the solution in his blog, and it works perfectly.
http://www.bit-101.com/blog/?p=946

Basically it involves using the [Frame] metatag to tell MXMLC to use your
preloader class as the factoryClass, moving your Main class (and it's
assets) to frame 2.  Once everything is  loaded, have the preloader init
your main class via an indirect reference (getDefinitionByName).  The
indirect reference prevents the Main class (and all its assets) from being
required by the preloader, otherwise everything would get dumped onto the
preloader's frame and break the whole process.

--
andy makely


On 1/18/07, Sascha <[EMAIL PROTECTED]> wrote:

Can somebody enlighten me?
How do you use AS3 embedded assets with a preloader (without the Flash
IDE)?
In AS2/Flash8 and below we could put a preloader on frame1 of the main
timeline and put all the heavy assets from the library on frame2 or
beyond.

In AS3 I wrote a custom Preloader class that extends MovieClip so if it's
done loading it can proceed to frame2 but how do I get the embedded assets
into frame2? I guess it doesn't work like that in AS3 anymore?!

But in Flex the preloader works and it seems it does it without using
frames
(the Preloader class extends Sprite).

Are there any tricks to get this done in an AS3 project and without using
Flash IDE?

Thanks in advance,
Sascha


_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to