2 Replies Latest reply on Sep 19, 2011 5:46 PM by Jasmine_S

    AS3 Movie clip start and stop question.




      I am new to AS3 and am trying to work out how to stop a movie clip from playing on mouse click. At the moment I have created a movieclip which plays when the user clicks it, but I now want to be able to stop the movieclip if the user clicks on it again.
      At the moment I have the following code:


      bigTree_mc.addEventListener(MouseEvent.CLICK, onClickplayAnimation);

      function onClickplayAnimation(event:MouseEvent):void


      The tree animation plays fine, but i want to be able to stop it if the user clicks it again.


      Any help would be appreciated!