PDA

View Full Version : Strange problem.. need help!!


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??

farafiro
04-10-2003, 09:18 AM
hmmmm, It's because of the attachment of course, just make the attachment not to be in, in the first frame

avelives
04-10-2003, 02:44 PM
aah i see if i turn off the export in first frame function , i understand now its cause it was exporting the sound clips then preloading!!
ok thanks man was a great help , should have thought of that myself really!! thanks again

farafiro
04-10-2003, 02:53 PM
nop, anytime