I have made this loadthing that only shows the progress in percent,
but I only see 99% and 100%!
I’m not good at explaining, but I hope you get it
Here’s what I have done:
I have 3 keyframes, and in the third I have the clip itself with a stop(); actionscript.
In the first frame i have a dynamic text square that has the instant name ‘myOutput’.
The actionscript for that frame is:
percent = Math.floor(getBytesLoaded()/getBytesTotal()*100);
myOutput.text = percent + “% is loaded”;
In the second frame I just copied the text square, but I changed the actionscript to:
if (percent == 100){
gotoAndStop(3);
}else{
gotoAndPlay(1);
}
PS i just use the code in the kirupa tutorial… obviously i tweak it wen i need to but it works so i use it. simple.
EDIT:- wats the “math.floor” bit? wuldnt u rather round it? ive no idea wat flooring it does (in a mathmatical sense) but if its not gettin to the third frame id say its coz its reached a number which is just lower than 100 and therfore isnt a true %age value, hence its not meeting the final condition.
thanks maximum_flash! I’m gonna try that right now!
EDIT:
It doesn’t work, but thanks anyway!
EDIT2:
Haha, it DOES work, i just mixed one thing up! thanks man!
EDIT3:
the third edit!
This has the same problem,
it’s blank, blank, blank, blank, 100% loaded and then it pops up!
oh, by the way: Yes prophet, it’s getting to the third frame.
3 meg?? bloody hell i aint downloadin that!
wats on it?? i thout it was just a preloader?
blimey guvnor!!
Prophet.
PS ok this mite sound stupid but it mite be getting to 100% and imediately switchin to frame 3 before you see it. hav u got a dynamic text box on frame 3 to see if it actually gets to 100? coz if ur rounding it and your using the variable value then it mite be switchin too fast weras if u use getBytesLoaded() == getBytesTotal() then it should round to 100 before it actually gets there… try it, hav a look, u never know
PPS im on 56 k - y i aint downloadin it!!
PPPS uno thers a tutorials section with this stuff in right? its got about the “scrollable text thing” in ther… (basic version neway)
even if that was the case (but it’s not ), the loader would work right?
I think I wasn’t clear, when you test your movie hit ctrl+B and you would have seen this [SIZE=1](see attachment)[/SIZE]
You’re loading almost your complete movie on frame 1(except for 192 B) before the preloader can start working.
yea, the .fla file is like 3 times as big as the .swf file (when i export it).
And, i see “100% loaded” for like 1/10 of a sec before the actual page shows up, but i’ll have a look ;).
EDIT: and thanks scotty, i’m gonna try that as well!