# Preloader for swf within swf

**URL:** <https://forum.kirupa.com/t/preloader-for-swf-within-swf/159976>\
**Category:** flash\
**Created:** [August 22, 2005, 2:08pm UTC](https://forum.kirupa.com/t/preloader-for-swf-within-swf/159976 "2005-08-22T14:08:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pdabha](https://avatars.discourse-cdn.com/v4/letter/p/73ab20/32.png) [@pdabha](https://forum.kirupa.com/u/pdabha)\
**Post date:** [August 22, 2005, 2:08pm UTC](https://forum.kirupa.com/t/preloader-for-swf-within-swf/159976/1 "2005-08-22T14:08:50Z")

</div>

Hi,  
I have an swf file within another swf file and I need them both to preload at the same time. Right now, my main swf file is getting preloaded… but the swf file in it is not…

This is the code I am using right now.

totalBytes = Math.round(\_root.getBytesTotal() / 1024);  
loadedBytes = Math.round(\_root.getBytesLoaded() / 1024);  
percentDone = Math.round((\_root.loadedBytes / totalBytes) \* 100);  
if (\_root.\_framesloaded \>= \_root.\_totalframes) {  
gotoAndPlay(“start”);  
}

and in the frame that I called “start” I have the script

loadmovienum (“scene 1”, 1); 😑😑
