# Playing a movieclip using a button

**URL:** <https://forum.kirupa.com/t/playing-a-movieclip-using-a-button/296451>\
**Category:** flash\
**Created:** [September 15, 2009, 6:35am UTC](https://forum.kirupa.com/t/playing-a-movieclip-using-a-button/296451 "2009-09-15T06:35:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dmind](https://avatars.discourse-cdn.com/v4/letter/d/e95f7d/32.png) [@dmind](https://forum.kirupa.com/u/dmind)\
**Post date:** [September 15, 2009, 6:35am UTC](https://forum.kirupa.com/t/playing-a-movieclip-using-a-button/296451/1 "2009-09-15T06:35:40Z")

</div>

Hello guys,

I just need a little help here…

I have two buttons named buttonOne and buttonTwo. When I click buttonOne, the movie clip named oneMc should play its intro and then stop then after that whenever I click buttonTwo, the movieclip oneMc should play outro animation and then movieclip twoMc intro comes in.

What is the general idea for this one?  
Do I need to use the Loader and URLRequest for this one? or use a String?

Also, how can I call the movieclip to play its outro and play the next movieclip’s intro?

Here is my code so far…

buttonOne.buttonMode = true;  
buttonTwo.buttonMode = true;

buttonOne.addEventListener(MouseEvent.CLICK, btnOneHandler);  
function btnOneHandler(e:MouseEvent):void  
{  
oneMc.gotoAndPlay(“intro”);  
}

buttonTwo.addEventListener(MouseEvent.CLICK, btnTwoHandler);  
function btnTwoHandler(e:MouseEvent):void  
{  
twoMc.gotoAndPlay(“intro”);  
}

Thanks!
