# MovieClip button question

**URL:** <https://forum.kirupa.com/t/movieclip-button-question/281758>\
**Category:** Uncategorized\
**Created:** [February 12, 2009, 11:24pm UTC](https://forum.kirupa.com/t/movieclip-button-question/281758 "2009-02-12T23:24:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nufish](https://avatars.discourse-cdn.com/v4/letter/n/9d8465/32.png) [@nufish](https://forum.kirupa.com/u/nufish)\
**Post date:** [February 12, 2009, 11:24pm UTC](https://forum.kirupa.com/t/movieclip-button-question/281758/1 "2009-02-12T23:24:41Z")

</div>

I am trying to make intros and outros in my external .swf files using this code for the buttons. Now I don’t use the regular Button, but instead use MovieClip buttons with rollOver/rollOut actions and would like this code to work with the MC buttons.

If I have a regular button with the following actions it works well.

[COLOR=Blue][COLOR=RoyalBlue]on (release) {  
if (\_root.currMovie == undefined) {  
\_root.currMovie = “section2”;  
container.loadMovie(“section2.swf”);  
} else if (\_root.currMovie != “section2”) {  
if (container.\_currentframe\>= container.midframe) {  
\_root.currMovie = “section2”;  
container.play();  
}  
}  
}[/COLOR]

[COLOR=Black]But if I use a MovieClip as button and use the following actions it wont work at all.

[COLOR=RoyalBlue]this.onRelease = function() {  
if (\_root.currMovie == undefined) {  
\_root.currMovie = “section3”;  
container.loadMovie(“section3.swf”);  
} else if (\_root.currMovie != “section3”) {  
if (container.\_currentframe \>= container.midframe) {  
\_root.currMovie = “section3”;  
container.play();  
}  
}  
}[/COLOR]

I know there’s a bit of code lacking underneath the this.onRelease action but I can’t figure out what.  
[/COLOR][/COLOR]
