I'd like to do something that is very elementary, but not knowing actionscript 2 I'm having problems.
This is what I want to do.
1, Scene begins with no animation, and event listener is added to go_mc.
2, go_mc movieclip is clicked and a gotoAndPlay('first_event') is triggered.
3, After about 50 frames the animation is stopped and the event listener previously added to go_mc is removed.
4. New event listener is added to go_mc so that when it is clicked next time it will gotoAndPlay('second_event').
So basically I want to add an eventlistener to a movieclip, remove it at some point and then add a different event listener.
Here's how I might do it in AS3:
On frame 0
On frame 50
I could use one function and send the label name into it, but you get the idea.
Could anyone help me with converting this into AS2 please?
TIA,
Chris.
This is what I want to do.
1, Scene begins with no animation, and event listener is added to go_mc.
2, go_mc movieclip is clicked and a gotoAndPlay('first_event') is triggered.
3, After about 50 frames the animation is stopped and the event listener previously added to go_mc is removed.
4. New event listener is added to go_mc so that when it is clicked next time it will gotoAndPlay('second_event').
So basically I want to add an eventlistener to a movieclip, remove it at some point and then add a different event listener.
Here's how I might do it in AS3:
On frame 0
Code:
stop();
go_mc.addEventListener(MouseEvent.CLICK, first_event)
function first_event(event:MouseEvent):void
{ gotoAndPlay('first_one'); }
buttonMode = true;
On frame 50
Code:
stop();
go_mc.removeEventListener(MouseEvent.CLICK, first_event);
go_mc.addEventListener(MouseEvent.CLICK, second_event)
function second_event(event:MouseEvent):void
{ gotoAndPlay('second_one'); }
I could use one function and send the label name into it, but you get the idea.
Could anyone help me with converting this into AS2 please?
TIA,
Chris.