# Button Question

**URL:** <https://forum.kirupa.com/t/button-question/233101>\
**Category:** Uncategorized\
**Created:** [July 20, 2007, 3:10am UTC](https://forum.kirupa.com/t/button-question/233101 "2007-07-20T03:10:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![huckwalton](https://avatars.discourse-cdn.com/v4/letter/h/e19b73/32.png) [@huckwalton](https://forum.kirupa.com/u/huckwalton)\
**Post date:** [July 20, 2007, 3:10am UTC](https://forum.kirupa.com/t/button-question/233101/1 "2007-07-20T03:10:09Z")

</div>

OK…  
I made a button out of a MC using this code:

```auto
stop(); 

this.onEnterFrame = function(){ 
if(rewind == true){ 
prevFrame(); 
} 
} 
  
this.onRollOver = function(){ 
rewind = false; 
play(); 
} 
  
this.onRollOut = function(){ 
rewind = true; 
} 
  
this.onRelease = function(){ 
getURL("http://www.thesite.com/"); 
} 

```

I’m happy with the result. Is there a way to use this code to “loadmovie” say from a container? I tried putting this in place of the “onRelease” function (I changed it to an “if” statement):

```auto
if (_root.currMovie == undefined) {

_root.currMovie = "news";
container.loadMovie("news.swf");
} else if (_root.currMovie != "news") {
if (container._currentframe >= container.midframe) {

_root.currMovie = "news";
container.play();

}

}

}

```

If anything, this serves to show what I’m trying to get it to do.  
Thank you!
