hi guys
this is my first time posting here, but man this place has helped a newbie like me a bunch! excellent site.
heres the problem im having:
im loading external swf’s into an empty movie clip (called container2) into the main timeline, but the loading bar (the mc is called preload) does not scale at all nor it shows when the bytes loaded are more than 1 (i’ve tested it using the show streaming option when testing the movie).
the script i wrote seems to be working , cause it traces the total bytes loaded in the output window…
most of the preloaders / tutorials i’ve seen use 3 keyframes, my main movie is 1 keyframe long, i don’t know if this has anything to do with it.
heres the script:
preload.onEnterFrame = function() {
//setup variables
var Bload = _root.container2.getBytesLoaded();
var Btotal = _root.container2.getBytesTotal();
var Bpercentage = Math.round((load/total)*100);
//tell the preload bar to scale
_root.preload._xscale = Bpercentage;
//make bar visible / invisible
if ((Bpercentage == 100) ) {
delete this.onEnterFrame;
preload._visible=0;
}else {
if (Bpercentage >= 1){
preload._visible=100;
}
}
trace (Bload);
};
stop ();
sorry for the super long post and thanks in advance!
coche