Hello, I am making a simple labyrinth game with rollover functions. I made a labyrinth (button), and end button (at the end of labyrinth). If you touch end button it goes on frame 4, and if you touch labyrinth wall (button) it leads you to frame 5. I don’t know why, but only first button (start) on first frame is working.
Please help me, why the buttons aren’t working correctly.
Here is my code:
[SIZE=2][COLOR=#696969]stop();[/COLOR][/SIZE]
[SIZE=2][COLOR=#696969]
[/COLOR][/SIZE]
[SIZE=2][COLOR=#696969]btn_start.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);[/COLOR][/SIZE]
[SIZE=2][COLOR=#696969]function mouseDownHandler(event:MouseEvent):void {[/COLOR][/SIZE]
[SIZE=2][COLOR=#696969] gotoAndStop(2);[/COLOR][/SIZE]
[SIZE=2][COLOR=#696969]}[/COLOR][/SIZE]
[SIZE=2][COLOR=#696969]
[/COLOR][/SIZE]
[SIZE=2][COLOR=#696969]btn_begin.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler2);[/COLOR][/SIZE]
[SIZE=2][COLOR=#696969]function mouseDownHandler2(event:MouseEvent):void {[/COLOR][/SIZE]
[SIZE=2][COLOR=#696969] gotoAndStop(3);[/COLOR][/SIZE]
[SIZE=2][COLOR=#696969]}[/COLOR][/SIZE]
[SIZE=2][COLOR=#696969]
[/COLOR][/SIZE]
[SIZE=2][COLOR=#696969]btn_tryagain.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler3);[/COLOR][/SIZE]
[SIZE=2][COLOR=#696969]function mouseDownHandler3(event:MouseEvent):void {[/COLOR][/SIZE]
[SIZE=2][COLOR=#696969] gotoAndStop(1);[/COLOR][/SIZE]
[SIZE=2][COLOR=#696969]}[/COLOR][/SIZE]
[SIZE=2][COLOR=#696969]
[/COLOR][/SIZE]
[SIZE=2][COLOR=#696969]Labyrinth.addEventListener(MouseEvent.ROLL_OVER, mouseRollOver);[/COLOR][/SIZE]
[SIZE=2][COLOR=#696969]function mouseRollOver(event:MouseEvent):void {[/COLOR][/SIZE]
[SIZE=2][COLOR=#696969] gotoAndStop(5);[/COLOR][/SIZE]
[SIZE=2][COLOR=#696969]}[/COLOR][/SIZE]
[SIZE=2][COLOR=#696969]
[/COLOR][/SIZE]
[SIZE=2][COLOR=#696969]btn_end.addEventListener(MouseEvent.ROLL_OVER, mouseRollOver2);[/COLOR][/SIZE]
[SIZE=2][COLOR=#696969]function mouseRollOver2(event:MouseEvent):void {[/COLOR][/SIZE]
[SIZE=2][COLOR=#696969] gotoAndStop(4);[/COLOR][/SIZE]
[SIZE=2][COLOR=#696969]}[/COLOR][/SIZE]