|
-
Preloader help!
What've created, well had help with, is a preloader which loads the bytes.
movieLoaded = this.getBytesLoaded();
movieTotal = this.getBytesTotal();
percentage = Math.floor(movieLoaded/movieTotal*100);
display.text = "LOADED: "+percentage+" %";
if (percentage >= 100) {
gotoAndPlay("content", 1);
}
This works fine, but what I want to do is to have a loading bar along side the existing preloader.
What would I need to add to the existing script to make it work?
Cheers
Last edited by =RIDDICK=; 02-28-2008 at 04:38 AM.
-
preloader_mc.bar_mc._xscale = 0;
preloader_mc.display.text = "LOADED: 0 %";
this.onEnterFrame = function ()
{
movieLoaded = this.getBytesLoaded();
movieTotal = this.getBytesTotal();
percentage = Math.floor(movieLoaded/movieTotal*100);
this.preloader_mc.display.text = "LOADED: "+percentage+" %";
this.preloader_mc.bar_mc._xscale = percentage;
if (percentage >= 100) {
gotoAndPlay("content", 1);
}
}
Why do it the Hard way, when you could do it the Impossible way 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|