# Help with Buttons to open a swf in a container

**URL:** https://forum.kirupa.com/t/help-with-buttons-to-open-a-swf-in-a-container/212620
**Category:** flash
**Created:** [January 12, 2007, 4:11pm UTC](https://forum.kirupa.com/t/help-with-buttons-to-open-a-swf-in-a-container/212620 "2007-01-12T16:11:49Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Tonydouglas](https://avatars.discourse-cdn.com/v4/letter/t/7feea3/32.png) [@Tonydouglas](https://forum.kirupa.com/u/Tonydouglas)
#### Post date: [January 12, 2007, 4:11pm UTC](https://forum.kirupa.com/t/help-with-buttons-to-open-a-swf-in-a-container/212620/1 "2007-01-12T16:11:49Z")

</div>

Hi

I have a button and have used this code in the actions panel:

but.onPress = function () {  
\_root.createEmptyMovieClip(“container”, 1);  
loadMovie(“acoustic-education-em22ftp.swf”, “container”);  
container.\_x = 150 ;  
container.\_y = 20 ;  
}

This works fine…  
My problem is when I add another button I either get an error  
or nothing happens when the button is pressed.

I have changed the name of the movie on the second button, changed the container #  
Changed the name of the button as well…But nothing happens…  
I also have done these separately and in as many combinations as possible.

Any Ideas what I’m doing wrong…Any help would be appreciated.

Tony:hangover:
