# Problems PRELOADING a SWF file

**URL:** <https://forum.kirupa.com/t/problems-preloading-a-swf-file/26387>\
**Category:** flash\
**Created:** [July 22, 2003, 4:49pm UTC](https://forum.kirupa.com/t/problems-preloading-a-swf-file/26387 "2003-07-22T16:49:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Painkiller\_BR](https://avatars.discourse-cdn.com/v4/letter/p/4da419/32.png) [@Painkiller\_BR](https://forum.kirupa.com/u/Painkiller_BR)\
**Post date:** [July 22, 2003, 4:49pm UTC](https://forum.kirupa.com/t/problems-preloading-a-swf-file/26387/1 "2003-07-22T16:49:17Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 22, 2003, 5:03pm UTC](https://forum.kirupa.com/t/problems-preloading-a-swf-file/26387/2 "2003-07-22T17:03:15Z")

</div>

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.
