markhegz
November 8th, 2003, 08:55 PM
anyone have any ideas on how to add a percentage preloader to this fla?
Maizoon
November 9th, 2003, 05:32 PM
I *think* if you make a dynamic text box and give it a variable name like, LoadText
then put that box somewhere in your transition mc, which i think you called "loader"
then change this:
if (_root.content.getBytesLoaded()>=_root.content.getBytesTotal()) {
gotoAndPlay("loaded");
}
to
bytes_loaded = Math.round(_root.content.getBytesLoaded());
bytes_total = Math.round(_root.content.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.LoadText = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
gotoAndPlay("loaded");
}
of course the this.LoadText = Math.round line would have to reflect your path to it...ie _root.loader.LoadText = Math.round or whatever it should put a percentage loaded
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.