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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Another Preloader - AS1 to AS2? 1

Status
Not open for further replies.

fizzak

MIS
Feb 6, 2003
331
0
0
US
This is my preleader script, It's pretty simple but I cannot get it to work on an AS2 published swf. Any ideas?

Code:
onClipEvent (enterFrame) {
	loading = _parent.getBytesLoaded();
	total = _parent.getBytesTotal();
	percent -= (percent-((loading/total)*100))*.25;
	per = int(percent);
	percentage = per+"%";
	LoadBar._width = per;
	if (percent>99) {
		_parent.gotoAndPlay(2);
	}
}
 
Code:
onClipEvent (load) {
    var loading:Number;
    var total:Number;
    var percent:Number = 0;
    var per:Number;
    var percentage:String;
}

onClipEvent (enterFrame) {
    loading = _parent.getBytesLoaded();
    total = _parent.getBytesTotal();
    percent -= (percent-((loading/total)*100))*.25;
    per = int(percent);
    percentage = per+"%";
    LoadBar._width = per;
    if (percent>99) {
        _parent.gotoAndPlay(2);
    }
}

Regards. CLICK HERE TO DONATE.

VISIT MY FORUM
TO GET YOUR OWN FREE WEBSITE HOSTING
 
Rock on, I see what has changed now, Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top