Copy link to clipboard
Copied
so the title may be a bit confusing, but what im generally trying to do is make it so when i click this button, it turns into the next button, and that button turns into a different button when clicked, and so on. im trying to do this not on the main scene timeline though. what ive done is made a button, made a movie clip within it, then made all the different buttons and linked them with actionscript in the moveclip. but when i test it and try to click the first button, nothing happens. im pretty confused, so any help at all would be appreciated. thanks.
Copy link to clipboard
Copied
use a movieclip with the first 'button' (actually just the shape/text you want) on frame 1 and subsequent shapes/text on subsequent frames. put a stop() on frame 1 and use something like:
yourmovieclipbutton.addEventListener(MouseEvent.CLICK,clickF);
function clickF(e:MouseEvent):void{
switch (MovieClip(e.currentTarget).currentFrame){
case 1:
//do whatever
MovieClip(e.currentTarget).nextFrame();
break;
case 2:
//etc
}
}
Copy link to clipboard
Copied
thanks, i figured it out though.
Copy link to clipboard
Copied
you're welcome.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now