Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pre Loader Issues

Status
Not open for further replies.

B52AlphaJackal

Technical User
Mar 5, 2007
52
GB
hey, ok... i was using flash mx 02 and i had no problems what so ever with my preloading code, everything worked great, but i recently upgraded to mx 2004 so that i could change the context menu's on my flash movies...

the context menu works fine but now my preloader has stopped working it just shows a solid bar for the entire loading time of the movie... and i cant figure out what im doing wrong... surely the coding is the same as 02?

im sure mx 2004 is better but its so much more frustrating at the moment!
 
i WAS using:

myLoaded = Math.round(getBytesLoaded());
myTotal = Math.round(getBytesTotal());
myPercent = myLoaded/myTotal;
myBar._width = myPercent*160;
myText = Math.round(myPercent*100)+"%";
if (myLoaded == myTotal) {
gotoAndPlay(3);
} else {
gotoAndPlay(1);
}


But I've now got it working using

if (_root.getBytesTotal() != _root.getBytesLoaded()){
gotoAndPlay(1);
}
mybar._xscale=(_root.getBytesLoaded()/_root.getBytesTotal())*160;
loader_txt.text=Math.round((_root.getBytesLoaded()/_root.getBytesTotal())*100)+"%";



Thanks for taking the time to try and help me anyway...
its apreciated
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top