-
preloader not working please help
This is my preloader AS:
bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loadBar._width = getPercent*300;
this.loadText = Math.round(getPercent*100)+"%";
ifFramesLoaded(50);
// change number down to make movie start faster
this.gotoAndPlay(4);
When I test the site www.xpertintl.com it does not show the preloader. Can someone see anything wrong with my script?
Thanks,
gala
-
Living Proof
Hi..
Not sure if this quite right as I tried to adapt one of
my preloaders.
bytes_loaded = this.getBytesLoaded();
bytes_total = this.getBytesTotal();
getPercent = bytes_loaded/bytes_total;
this.loadBar._width = getPercent*300;
loadText = Math.floor(getPercent*100)+"%";
ifFramesLoaded(50);
//change number down to make movie start faster
this.gotoAndPlay(4);
If someone tells you it can't be done,
it's probally because they don't know how.
-
the preloader is still doing the same thing, any more ideas on how to fix this?
-
Living Proof
Ok, try:-
this.loadBar._xscale = getPercent*300;
instead of
this.loadBar._width = getPercent*300;
If someone tells you it can't be done,
it's probally because they don't know how.
-
I think that works, but I don't see the load bar moove or the % loaded change. Do you have any ideas of what I may have done wrong?
www.xpertintl.com/inprogress
Thanks,
gala
-
Living Proof
Hi
The action for the bar to move needs to be in a loop like this:-
MovieSize = _root.getBytesTotal();
LoadedSize = _root.getBytesLoaded();
PercentLoaded = LoadedSize / MovieSize
percent = Math.floor(PercentLoaded*100);
showPercent = percent + " %";
_root.growbar._xscale = percent
if (PercentLoaded < 1) {
gotoAndPlay("preload");
}
else {
gotoAndPlay("moviestart");
}
Where 'preload' is a lable in the first frame of preloader
and 'moviestart' is a label in the first frame of your movie proper.
If someone tells you it can't be done,
it's probally because they don't know how.
-
what do you think of this:
bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loadBar._width = getPercent*100;
this.loadText = Math.round(getPercent*100)+"%";
ifFramesLoaded(50);{this.gotoAndPlay("Home",4);}
if (bytes_loaded == bytes_total)
{this.gotoAndPlay("Home",4);}
what I am trying to do is have the 50% of the movie loaded and playing while the rest of the movie loads. The problem with this is the % loaded text box does not change.
thanks,
gala
-
Living Proof
Hi..
bytes_loaded = Math.round(this.getBytesLoaded());
ifFramesLoaded(50);
You are checking for BytesLoaded then using
ifFramesLoaded(50);
in your case try:-
if (getPercent > .5 ){
this.gotoAndPlay("Home",4);
}
Hopes this helps. I'm off out now until tomorrow.
I'm not that good myself at all this. There are a lot of much
better people out there. Hope they pick up on this for you.
mave_the_rave.
If someone tells you it can't be done,
it's probally because they don't know how.
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
|