# Preloader within Preloader Madness... (and question)

**URL:** <https://forum.kirupa.com/t/preloader-within-preloader-madness-and-question/318087>\
**Category:** flash\
**Created:** [January 10, 2011, 12:28pm UTC](https://forum.kirupa.com/t/preloader-within-preloader-madness-and-question/318087 "2011-01-10T12:28:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![newsteve](https://avatars.discourse-cdn.com/v4/letter/n/5f8ce5/32.png) [@newsteve](https://forum.kirupa.com/u/newsteve)\
**Post date:** [January 10, 2011, 12:28pm UTC](https://forum.kirupa.com/t/preloader-within-preloader-madness-and-question/318087/1 "2011-01-10T12:28:15Z")

</div>

Hi,

I have a main preloader that loads Main.swf. Within Main.swf the user can open up other sub swfs, but they all need a preloader too. I have this all working for one sub swf, but I don’t want to make 17 sub swf preloaders, and am wondering how I can - based on the button on stage pushed - pass along to the ONE sub preloader which sub swf to preload…

Is it possible to pass a variable between different swfs? Any ideas? Here’s what I have now within the Main.swf to access the sub preloader:

[LEFT][COLOR=#993300]private[/COLOR] [COLOR=#993300]function[/COLOR] loadSWFCOLOR=#000000[/COLOR]:[COLOR=#993300]void[/COLOR]  
[COLOR=#000000]{[/COLOR]  
myLoader = [COLOR=#993300]new[/COLOR] LoaderCOLOR=#000000[/COLOR];  
myLoader.[COLOR=#000000]contentLoaderInfo[/COLOR].[COLOR=#000000]addEventListener[/COLOR][COLOR=#000000]([/COLOR]Event.[COLOR=#000000]COMPLETE[/COLOR], onLoaded, [COLOR=#993300]false[/COLOR], [COLOR=#000000]0[/COLOR], [COLOR=#993300]true[/COLOR][COLOR=#000000])[/COLOR];  
myLoader.[COLOR=#993300]load[/COLOR][COLOR=#000000]([/COLOR][COLOR=#993300]new[/COLOR] URLRequestCOLOR=#000000[/COLOR][COLOR=#000000])[/COLOR];  
[COLOR=#000000]}[/COLOR]  
[/LEFT]
