# 2 containers for external swf's

**URL:** <https://forum.kirupa.com/t/2-containers-for-external-swfs/50478>\
**Category:** flash\
**Created:** [May 3, 2004, 2:43pm UTC](https://forum.kirupa.com/t/2-containers-for-external-swfs/50478 "2004-05-03T14:43:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Naughtyboy](https://avatars.discourse-cdn.com/v4/letter/n/f14d63/32.png) [@Naughtyboy](https://forum.kirupa.com/u/Naughtyboy)\
**Post date:** [May 3, 2004, 2:43pm UTC](https://forum.kirupa.com/t/2-containers-for-external-swfs/50478/1 "2004-05-03T14:43:41Z")

</div>

[color=black][font=Arial]I followed Kirupa’s {Transitions between External SWFs} tutorial and I did make some changes.[/font][/color]

[font=Arial]So i have a main movie with 2 containers {one container for the content to be loaded in and the other container for the banners} the main SWF would just include the background and buttons. So, i am loading all banners and content as external SWF’s. I have the following AS on the buttons to make the buttons interact with both SWF’s. I want it to be so when a button is pressed, both external SWF’s will be loaded {For example: Content1 + BannerContent1 or Content2 + BannerContent2}[/font]

[font=Arial]on (release) {  
if (\_root.currMovie == undefined) {  
\_root.currMovie = “Content1”;  
MainMclCacher.loadMovie(“Content1.swf”);  
} else if (\_root.currMovie != “Content1”) {  
if (MainMclCacher.\_currentframe \>= MainMclCacher.midframe) {  
\_root.currMovie = “Content1”;  
MainMclCacher.play();  
}  
}  
if (\_root.currBanner == undefined) {  
\_root.currBanner = “BannerContent1”;  
BannerCacher.loadMovie(“BannerContent1.swf”);  
} else if (\_root.currBanner != “BannerContent1”) {  
if (BannerCacher.\_currentframe \>= BannerCacher.midframe) {  
\_root.currBanner = “BannerContent1”;  
BannerCacher.play();  
}  
}  
}[/font]

[font=Arial]This is working great!! I just want to know if this is the way 2 go or is there a better way to dealing with this?[/font]

[font=Arial]Thanks for the tips or suggestions[/font]
