3 Replies Latest reply on Jun 27, 2012 1:52 PM by Ned Murphy

    Making a button in actionscript 3.0 HELPPP!!!

    TouhouLover

      ok so in my animation class i used one that always worked, but i can't remember it and school is over! The button made it so that you stayed on the scene until the button was clicked, when the button was clicked it took you to whatever scene i put in the actions.  I tried this coding but to no avail! >

       

      btn_1.addEventListener(MouseEvent.Mouse_UP,mouseUpHandler);

       

      function mouseUpHandler(event:MouseEvent):void {

      gotoAndPlay (1,"Scene 2");

      }

       

      I know i need a stop(): up top but other than that i don't know what to do! I know the code i useddidn't have

       

      btn_1.addEventListener(MouseEvent.Mouse_UP,mouseUpHandler);

      OR

       

      function mouseUpHandler(event:MouseEvent):void {

       

       

      I know this isn't very descriptive, but if anybody has better coding it'd be a great help! (I'm working on a short movie and I don't want it to loop play!)