views:

23

answers:

1

hello! i made a project in as3. everything works fine but i attach some movieclip from the library, and the size of the swf is 300kb. i have no timeline keyframes, everything is attached dinamically from the library or externally.

how can i build a preloader for the root? (yeah i know, root doesn't exist anymore but i'm asking for it cause i come from as2)

thanks a lot :)

+1  A: 

By far the easiest way to add a preloader in as3 is to just have a 'wrapper' swf that loads in your main swf. There's loads of tutorials about this on the net and about using the Loader class in general. There is a much more convoluted method of doing it related to not loading your assets until frame 2 at which point they all have to be on the stage or some such shenanigans that I've never bothered to get working and I would recommend you ignore.

dr_tchock
thanks a lot for the answer dr_tchock.so, unfortunately, i had to re-write a big piece of the site.but i'll keep it in mind when i'll work on the next project. thanks a lot man!
Luca