Skip to main content
February 4, 2013
Answered

How do you link buttons to different scenes ?

  • February 4, 2013
  • 1 reply
  • 463 views

Tried to link it and its not working just coming up with errors ?

Any advice ?

This topic has been closed for replies.
Correct answer Ned Murphy

Do you have some reference that told you to use "..." in your code?  Try...

stop();

btnarrow.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);

function mouseDownHandler(event:MouseEvent):void {

   gotoAndStop(FRAME, "Contents");

}

and FRAME needs to be a variable that either identifies a frame number or a frame label



1 reply

Ned Murphy
Legend
February 4, 2013

Show the code you are trying to use that is not working.  That will make it easier to see what you tried and why it might not be working.  Also, if you get errors, include the entire error message(s) in your posting.

February 4, 2013

stop();btnarrow.addEventListener(Mouse… mouseDownHandler);function mouseDownHandler(event:MouseEvent):void {

gotoAndStop(FRAME, "Contents");

}

Open Scene, Layer 'actions', Frame 1, Line 31093: Syntax error.

Open Scene, Layer 'actions', Frame 1, Line 31084: Syntax error: expecting rightparen before mouseDownHandler.

Contents, Layer 'Actions', Frame 2, Line 11093: Syntax error.

Contents, Layer 'Actions', Frame 2, Line 11084: Syntax error: expecting rightparen before mouseDownHandler.
Ned Murphy
Ned MurphyCorrect answer
Legend
February 4, 2013

Do you have some reference that told you to use "..." in your code?  Try...

stop();

btnarrow.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);

function mouseDownHandler(event:MouseEvent):void {

   gotoAndStop(FRAME, "Contents");

}

and FRAME needs to be a variable that either identifies a frame number or a frame label