I've got an .swf of which is 83% images and weighs ~4mb.
For that big size I decided I would do an preloader, however, the preloader's frame will only load after images and other resources are loaded.
Basically, the preloader will only appear after 83% of that .swf is loaded, which leaves the white screen for a big time, and only then displays the preloader.
In even simpler words, I want to set the loading priority of something(a resource? a scene? a frame?), or, load only a single frame and then let that frame load the rest.
Please point out if you didn't understand what I mean.
No, I'm using Flash CS5.5. Maybe it was fault of my interpretation.
I'm currently editing a .fla file, not an .swf. This .fla file has two scenes, whose the first is used for the preloader, which will skip to the next scene when the movie is loaded.
If that is revelant, here is the code of the preloader:
| var total:Number; | |
| var loaded:Number; | |
| this.onEnterFrame = function() | |
| { | |
| total = _root.getBytesTotal(); | |
| loaded = _root.getBytesLoaded(); | |
| if(loaded >= total){ | |
| delete(onEnterFrame); | |
| nextScene(); | |
| } | |
| _root.ppl = (Math.floor((loaded/total)*100)).toString() + "%"; | |
| }; | |
| stop(); |
"ppl" is the variable which holds the contents of an dynamic text which shows the percentage.
North America
Europe, Middle East and Africa
Asia Pacific