# Loadmovie and paths to buttons

**URL:** https://forum.kirupa.com/t/loadmovie-and-paths-to-buttons/161131
**Category:** Uncategorized
**Created:** [September 1, 2005, 3:30am UTC](https://forum.kirupa.com/t/loadmovie-and-paths-to-buttons/161131 "2005-09-01T03:30:12Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![mojodojo](https://avatars.discourse-cdn.com/v4/letter/m/a87d85/32.png) [@mojodojo](https://forum.kirupa.com/u/mojodojo)
#### Post date: [September 1, 2005, 3:30am UTC](https://forum.kirupa.com/t/loadmovie-and-paths-to-buttons/161131/1 "2005-09-01T03:30:12Z")

</div>

I want to keep all of my action script in 1 swf file we will call main.swf and use loadmovie to open child swf files in a moviclip called contents. One of the swf files has some buttons on it. I am trying to write an onRelease event handler in main.swf for one of the buttons in the loaded movie. This is pretty much what I have in the main.swf file:

\_root.mainButton.onRelease=function(){  
contents.loadMovie(“child.swf”);  
}

this.contents.playBtn.onRelease=function(){  
trace(“playBtn was pressed”);  
}

when I press playBtn, nothing happens. I am assuming it has something to do with the main.swf file not having the child.swf file loaded and not aware of the contents of child.swf when it loads. I am not sure though, I am pretty new to all of this. Like I said, I would like to have all of the actionscript in one file. Thanks for any help.
