Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

control stage frame from button function

New Here ,
Nov 06, 2014 Nov 06, 2014

when i press the button

it does the trace but ignore the gotoAndPlay

did i miss anything?

package

{

  import flash.display.MovieClip;

  import flash.events.MouseEvent;

  public class Main extends MovieClip

  {

  public function Main()

  {

  playgame_btn.addEventListener(MouseEvent.CLICK, playgame);

  readme_btn.addEventListener(MouseEvent.CLICK, pressread);

  }

  function playgame(event:MouseEvent):void

  {

  trace("PLAY has been clicked.");

  gotoAndStop(140);

  }

  function pressread(event:MouseEvent):void

  {

  trace("SHOW has been clicked.");

  gotoAndStop(140);

  }

  }

}

TOPICS
ActionScript
175
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Nov 07, 2014 Nov 07, 2014

Since there is no gotoAndPlay() command in the code, I will assume you mean the gotoAndStop() commands.   The code appears fine.  You should place a trace in frame 140 to check to see if it gets there but you do not see it.

Translate
LEGEND ,
Nov 07, 2014 Nov 07, 2014
LATEST

Since there is no gotoAndPlay() command in the code, I will assume you mean the gotoAndStop() commands.   The code appears fine.  You should place a trace in frame 140 to check to see if it gets there but you do not see it.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines