1 Reply Latest reply: Nov 7, 2014 4:41 AM by Ned Murphy RSS

    control stage frame from button function

    WEW Community Member

      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);

        }

        }

      }