How to Create a Custom Play Button for Flash

Written by william nagel
  • Share
  • Tweet
  • Share
  • Pin
  • Email
How to Create a Custom Play Button for Flash
Add a play button to your Flash animations. (play icon. (with clipping path) image by Andrey Zyk from Fotolia.com)

Adobe Flash animations and movies will start automatically when they are opened on a web page or in a Flash viewer. Creating a custom Play button for your Adobe Flash movie or animation allows you to control when your Flash animation begins and adds a personal touch to your creation. A play button included at the beginning of your animation will utilise Adobe's ActionScript code to start the movie when you press the button.

Skill level:
Moderate

Other People Are Reading

Instructions

  1. 1

    Open the animation you want to add a button to in Adobe Flash. Press the "Add New Layer" button to add a new layer to your animation called "Buttons." Use the drawing tools to create an image for your button in the new layer.

  2. 2

    Select the image with the "Selection" tool. Press "F8" or select "Convert to Symbol" from the "Modify" menu to open the "Convert to Symbol" dialogue.

  3. 3

    Select "Button" as the "Symbol Type" and give your button a name that indicates its function, such as "PlayButton." Press "OK" to convert your image to a symbol.

  4. 4

    Press the "Add New Layer" button to add a new layer to your animation called "Actions." Select the keyframe in the first frame of the "Actions" layer. Select "Actions" from the "Window" menu to open the "Script" pane.

  5. 5

    Type "Stop();" into the script pane and press "Enter" twice. Type the following code into the "Script" pane:

    function start Movie(event:MouseEvent):void { this.play(); }

  6. 6

    Press "Enter" twice after entering the above code and add the following line of code to the "Script" window:

    PlayButton.addEventListener(MouseEvent.CLICK, start Movie);

  7. 7

    Save the changes to your animation. Test your animation by selecting "Test Movie" from the "Control" menu. Press the "Play" button to begin your animation.

Tips and warnings

  • You can create additional buttons, such as "Pause," "Rewind" and "Restart" by learning Adobe ActionScript and adding additional code to the "Script" pane.
  • Save your work frequently to avoid losing data.

Don't Miss

Filter:
  • All types
  • Articles
  • Slideshows
  • Videos
Sort:
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the eHow.co.uk site, you consent to the use of cookies. For more information, please see our Cookie policy.