1 Reply Latest reply on Apr 11, 2009 2:55 PM by Ned Murphy

    Adding a Play button

      Hi - I have a flash product tour that I had created by an outside contractor. Now I'd like to add a "Play" button to it rather than the way it is: automatically starts playing.

       

      I have the FLA and the FLV files for it. How can I put a "Play" button?? (The flash I am tlking about is at the bottom of the page on http://rooh.it

       

      Thanks,

        • 1. Re: Adding a Play button
          Ned Murphy Adobe Community Professional & MVP

          First you'll want to place a stop(); command somewhere early in the timeline on an actions layer, possibly frame 1.  IF the file loads any external content there may already be a stop in frame 1 to allow for that, so it may need to be place further down the timeline, wherever the actual playing begins.

           

          To make a play button, obviously, you create the button.  To make it function you would probably only need to utilize a play(); command in the button's function code.  The function code for the button will depend on what version of actionscript the file is using, which you can find via the Publish Settings.  In either case below, it assumes you give your button an instance name of "playBtn" (you can name it as you please).

           

          If it's AS2, then the timeline code for the button would be:

           

          playBtn.onRelease = function(){

              play();

          }

           

           

          If it's AS3, the timeline code for the button would be:

           

          function playMovie(evt:MouseEvent):void {

              play();

          }

           

          playBtn.addEventListener(MouseEvent.CLICK, playMovie);