# Loading, unloading swf through button

**URL:** https://forum.kirupa.com/t/loading-unloading-swf-through-button/297030
**Category:** Uncategorized
**Created:** [September 24, 2009, 12:24pm UTC](https://forum.kirupa.com/t/loading-unloading-swf-through-button/297030 "2009-09-24T12:24:35Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![thebigG](https://avatars.discourse-cdn.com/v4/letter/t/f14d63/32.png) [@thebigG](https://forum.kirupa.com/u/thebigG)
#### Post date: [September 24, 2009, 12:24pm UTC](https://forum.kirupa.com/t/loading-unloading-swf-through-button/297030/1 "2009-09-24T12:24:35Z")

</div>

ok i’ll try to explain it simply and clearly. i have looked for a solution for a long time but they either didnt work and were too complicated for my little skill.  
so i have a main .swf which im working on. i then have buttons which when clicked, launch a panorama. the problem is that this panorama is created with a 3rd party program and is a .swf. now. i curretly have the follwoing script to launch the panorama  
on(release){  
loadMovieNum (“foyer\_pano.swf”, \_root)  
}  
however this opens the swf in a new tab of my web browser. now that is not too bad, but i would like and it would be much better if the panorama would open inside my current swf. i remember i managed to do this. (sorry i forgot the code for it!!!) but when this was done, it would cover all my other buttons. i tried different things with changing levels and those sort of things, but nothing seemed to worked. (i was able to display a button on top of the swf but its AS woudlnt work)

does anybody know how to do this? can someone explain it quite simply and in detail? i just want to load an swf in my project, and have a button on top of it with which i can unload this swf. (note that i cannot edit the settings of the panorama swf except for its size and dimensions and stuff, i cannot add a button or AS into it)

thank you very much for your help :hugegrin:
