PDA

View Full Version : Problems PRELOADING a SWF file



Painkiller_BR
July 22nd, 2003, 12:49 PM
Could someone help me PLEASE !

I tried to modify this code to preload a SWF file... but I can't do it...

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)+"%";
if (bytes_loaded == bytes_total) {
this.gotoAndPlay(3);
}

I just load a movie like this :
loadMovieNum("In.swf", 1);

How can I preload my In.swf file ???

I tried to modify like this :
bytes_loaded = Math.round(loadMovieNum("In.swf", 1).getBytesLoaded());

Didn't work...
Can anyone help ? THANKS !!!!!!!!!!!!!!!!!

claudio
July 22nd, 2003, 01:03 PM
You can add a preloader in the beggining of the external swf, just like you did with your main movie. Or you can setup a function to manage all external swf.