avelives
04-09-2003, 02:34 PM
ok i have a movie which when it loads in tells a movie called music (which is an MP3 player) to load into itself (it loads into level2)
Now i have a preloader on the music movie and cant understand why it wont work as i have the exact same preloader elsewhere in the movie.
here it is.
stop();
this.bar._visible=false;
this.onEnterFrame = function() {
if (this.getBytesLoaded()<this.getBytesTotal()) {
this.bar._visible=true;
Total = this.getBytesTotal()/1000;
Received = this.getBytesLoaded()/1000;
Percentage = (Received/Total)*100;
this.bar.barmc._xscale = int(Percentage);
} else {
this.gotoAndPlay(2);
this.onEnterFrame = null;
this.bar._visible=false;
}
}
The clip named bar is becomes visible when it begins calculating the percentage loaded (or should do) but when i attach this script to my music movie it wont display any data.
It perfoms the preload fine but the preloader bar only appears for last few seconds of the download process and is almost complete when it does.
I have attached sounds in my music movie with linkage names (could it be them which are interfereing with the movie or not being calculated into the movie size by this code??)
Please some one help as i have tried this script on various test movies and it works fine !!
so why doesnt it work with this??
Now i have a preloader on the music movie and cant understand why it wont work as i have the exact same preloader elsewhere in the movie.
here it is.
stop();
this.bar._visible=false;
this.onEnterFrame = function() {
if (this.getBytesLoaded()<this.getBytesTotal()) {
this.bar._visible=true;
Total = this.getBytesTotal()/1000;
Received = this.getBytesLoaded()/1000;
Percentage = (Received/Total)*100;
this.bar.barmc._xscale = int(Percentage);
} else {
this.gotoAndPlay(2);
this.onEnterFrame = null;
this.bar._visible=false;
}
}
The clip named bar is becomes visible when it begins calculating the percentage loaded (or should do) but when i attach this script to my music movie it wont display any data.
It perfoms the preload fine but the preloader bar only appears for last few seconds of the download process and is almost complete when it does.
I have attached sounds in my music movie with linkage names (could it be them which are interfereing with the movie or not being calculated into the movie size by this code??)
Please some one help as i have tried this script on various test movies and it works fine !!
so why doesnt it work with this??