1 Reply Latest reply on Mar 10, 2011 5:11 PM by Skoolbus777

    Flash CS4(AC3)

    giohh Level 1

      Hello, I would like to ask the script to control movie clip?
      clicking the button, play starts the event
      clicking another button, the event starts stop
      but I've tried and failed, please help me

        • 1. Re: Flash CS4(AC3)
          Skoolbus777 Level 1
          button.addEventListener(MouseEvent.CLICK, stopplay);
          function stopplay(event:MouseEvent):void
          {
          test3.play();
          }
          button2.addEventListener(MouseEvent.CLICK, stopper);
          function stopper(event:MouseEvent):void
          {
          test3.stop();
          }
          ------------
          See above.
          1. drop your mc on the timeline, have 2 buttons on your timeline [one to play, one to stop]
          2. make your buttons have an instance name (I did names as button and button2)
          3. on a top layer for your Actionscript, put the above code in and plug in the necessary info.
          4. plug in wording above with your instanceName, functionName, and symbol Name. Italicized stuff (shown in my example above, don't do in actual coding) is code you word or you can use my wording.
          5. test3 is the movie instance name of the movie you'll have to control. Again, name it however you want.
          Summary: You're creating two buttons, each having instance names, that tell a mc to play and another to stop.