0
votes

I'm having some difficulties with preloader and assets. I'm working with FlashDevelop so pure AS3/Flex, no FLASH IDE

The thing is : when I try to addChild() something like a swf or event a simple png/jpg it kills the preloader completly (blanck screen until the game is fully loaded, then the preloader is launch (but the game is already loaded) so one frame later I'm after the preloader.

I think I missed something in the logic behind the management of the famous "first frame" and the loader progress event.

If someone have any idea about what I'm talking about. I'd like some light about the subject ^^

Thx !

-UPDATE-

I re-searched for more informations and found this post :

How does the preloader work in as3?

MichaelJW points my problem but doesn't answer it :

"You can do whatever you like in a preloader, but it won't run any of its code until everything needed by the preloader has downloaded. So if you make a preloader with a 3MB image file and a progress bar, the progress bar won't do anything until the entire image has downloaded!"

So how do you get to use some image to build a preloader ?

1

1 Answers

0
votes

I have encountered this before and my "work around" was to build 2 separate loaders. The first is VERY light weight and loads all initial assets (like a rotating 5k png), the second if the "bulk load" of assets etc..

when the first is done loading it triggers the load of the second round of assets. You are right tho, you CANNOT use assets till they are loaded completely..