I've got a 1.9 meg swf file. A very simple preloader bar is on the first frame. However, online testing has shown me that not until 1.6 megs of the total has loaded does the simple preloader show up, more than halfway done.
Are there better ways to code the preload step that will get a frame to display once it is actually loaded? Here's what I have:
stop();
onEnterFrame = function() {
framesLoaded = (Math.ceil (( _parent.getBytesLoaded() / _parent.getBytesTotal()) * 100));
this.gotoAndStop (framesLoaded);
preloader.info_txt.text = framesLoaded + "% completed";
if (framesLoaded >= 90) {
_root.gotoAndPlay ("Start");
}
}
That is on the first frame of a little movie clip called preloader, which is just a text box and a shape graphic that gets shaped tweened as frames are downloaded.
The first frame of the main timeline has a stop(); action and two layers: the above preloader and a static text box with a name.
That's all there is.
My test is at:
http://www.johnsoncreativegroup.com/don/
I see about a three-four second delay of black screen before the preloader pops up.
Any ideas on this anyone? Thanks