# Multiple Buttons, Array and activation

**URL:** <https://forum.kirupa.com/t/multiple-buttons-array-and-activation/313523>\
**Category:** flash\
**Created:** [September 1, 2010, 9:02pm UTC](https://forum.kirupa.com/t/multiple-buttons-array-and-activation/313523 "2010-09-01T21:02:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cmathison](https://avatars.discourse-cdn.com/v4/letter/c/b2d939/32.png) [@cmathison](https://forum.kirupa.com/u/cmathison)\
**Post date:** [September 1, 2010, 9:02pm UTC](https://forum.kirupa.com/t/multiple-buttons-array-and-activation/313523/1 "2010-09-01T21:02:00Z")

</div>

[FONT=Calibri, Verdana, Helvetica, Arial]Hello.

My question(s) deals with arrays in AS3. I know how to set up basic arrays and have buttons control movieclips within the array ect.

What I was wondering how do you control the buttons in an Array: For example: I would only like the buttons in the array to be activated once the previous button has played its movieclip. And the button to activate the next button in the array would be at the finish of the movieclip (in that movieclip) that was playing in the first button

Is this making any sense? Can anyone help me with this?

perhaps put sample code, I am attaching my SWF only thing small enough, also some of my code below to try and illustrate my problem more.  
I would so greatly appreciate this!  
Thanks!  
Christine

**FRAME ONE MAIN TIMELINE**  
stop();

startButton.addEventListener(MouseEvent.ROLL\_OVER, startWF);

function startWF(myEvent:MouseEvent){  
gotoAndStop(2);  
}

**FRAME TWO MAIN TIMELINE**

import flash.display.MovieClip;  
import flash.events.MouseEvent;

btn1.addEventListener(MouseEvent.CLICK, onClickHandler1);

// if you want a hand cursor  
btn1.buttonMode = true;  
btn1.useHandCursor = true;

function onClickHandler1(myEvent:MouseEvent){  
mc1.play();  
}

**BUTTON IN MOVIECLIP ONE ACTIVATED FROM BUTTON ONE TO BRING TO BUTTON TWO LARGE BUTTON BELOW BUTTON 1**

stop();

// if you want a hand cursor  
next\_btn.buttonMode = true;  
next\_btn.useHandCursor = true;

next\_btn.addEventListener(MouseEvent.CLICK,goForward);

function goForward(event:MouseEvent):void{  
nextScene();  
}[/FONT]
