User Guide Cancel

How to create buttons with Animate

  1. Adobe Animate User Guide
  2. Introduction to Animate
    1. What's New in Animate
    2. Visual Glossary
    3. Animate system requirements
    4. Animate keyboard shortcuts
    5. Work with Multiple File Types in Animate
  3. Animation
    1. Animation basics in Animate
    2. How to use frames and keyframes in Animate
    3. Frame-by-frame animation in Animate
    4. How to work with classic tween animation in Animate
    5. Brush Tool
    6. Motion Guide
    7. Motion tween and ActionScript 3.0
    8. About Motion Tween Animation
    9. Motion tween animations
    10. Creating a Motion tween animation
    11. Using property keyframes
    12. Animate position with a tween
    13. How to edit motion tweens using Motion Editor
    14. Editing the motion path of a tween animation
    15. Manipulating motion tweens
    16. Adding custom eases
    17. Creating and applying Motion presets
    18. Setting up animation tween spans
    19. Working with Motion tweens saved as XML files
    20. Motion tweens vs Classic tweens
    21. Shape tweening
    22. Using Bone tool animation in Animate
    23. Work with character rigging in Animate
    24. How to use mask layers in Adobe Animate
    25. How to work with scenes in Animate
  4. Interactivity
    1. How to create buttons with Animate
    2. Convert Animate projects to other document type formats
    3. Create and publish HTML5 Canvas documents in Animate
    4. Add interactivity with code snippets in Animate
    5. Creating custom HTML5 Components
    6. Using Components in HTML5 Canvas
    7. Creating custom Components: Examples
    8. Code Snippets for custom Components
    9. Best practices - Advertising with Animate
    10. Virtual Reality authoring and publishing
  5. Workspace and workflow
    1. Creating and managing Paint brushes
    2. Using Google fonts in HTML5 Canvas documents
    3. Using Creative Cloud Libraries and Adobe Animate
    4. Use the Stage and Tools panel for Animate
    5. Animate workflow and workspace
    6. Using web fonts in HTML5 Canvas documents
    7. Timelines and ActionScript
    8. Working with multiple timelines
    9. Set preferences
    10. Using Animate authoring panels
    11. Create timeline layers with Animate
    12. Export animations for mobile apps and game engines
    13. Moving and copying objects
    14. Templates
    15. Find and Replace in Animate
    16. Undo, redo, and the History panel
    17. Keyboard shortcuts
    18. How to use the timeline in Animate
    19. Creating HTML extensions
    20. Optimization options for Images and Animated GIFs
    21. Export settings for Images and GIFs
    22. Assets Panel in Animate
  6. Multimedia and Video
    1. Transforming and combining graphic objects in Animate
    2. Creating and working with symbol instances in Animate
    3. Image Trace
    4. How to use sound in Adobe Animate
    5. Exporting SVG files
    6. Create video files for use in Animate
    7. How to add a video in Animate
    8. Draw and create objects with Animate
    9. Reshape lines and shapes
    10. Strokes, fills, and gradients with Animate CC
    11. Working with Adobe Premiere Pro and After Effects
    12. Color Panels in Animate CC
    13. Opening Flash CS6 files with Animate
    14. Work with classic text in Animate
    15. Placing artwork into Animate
    16. Imported bitmaps in Animate
    17. 3D graphics
    18. Working with symbols in Animate
    19. Draw lines & shapes with Adobe Animate
    20. Work with the libraries in Animate
    21. Exporting Sounds
    22. Selecting objects in Animate CC
    23. Working with Illustrator AI files in Animate
    24. Applying blend modes
    25. Arranging objects
    26. Automating tasks with the Commands menu
    27. Multilanguage text
    28. Using camera in Animate
    29. Graphic filters
    30. Sound and ActionScript
    31. Drawing preferences
    32. Drawing with the Pen tool
  7. Platforms
    1. Convert Animate projects to other document type formats
    2. Custom Platform Support
    3. Create and publish HTML5 Canvas documents in Animate
    4. Creating and publishing a WebGL document
    5. How to package applications for AIR for iOS
    6. Publishing AIR for Android applications
    7. Publishing for Adobe AIR for desktop
    8. ActionScript publish settings
    9. Best practices - Organizing ActionScript in an application
    10. How to use ActionScript with Animate
    11. Accessibility in the Animate workspace
    12. Writing and managing scripts
    13. Enabling Support for Custom Platforms
    14. Custom Platform Support Overview
    15. Working with Custom Platform Support Plug-in
    16. Debugging ActionScript 3.0
    17. Enabling Support for Custom Platforms
  8. Exporting and Publishing
    1. How to export files from Animate CC
    2. OAM publishing
    3. Exporting SVG files
    4. Export graphics and videos with Animate
    5. Publishing AS3 documents
    6. Export animations for mobile apps and game engines
    7. Exporting Sounds
    8. Best practices - Tips for creating content for mobile devices
    9. Best practices - Video conventions
    10. Best practices - SWF application authoring guidelines
    11. Best practices - Structuring FLA files
    12. Best Practices to optimize FLA files for Animate
    13. ActionScript publish settings
    14. Specify publish settings for Animate
    15. Exporting projector files
    16. Export Images and Animated GIFs
    17. HTML publishing templates
    18. Working with Adobe Premiere Pro and After Effects
    19. Quick share and publish your animations
  9. Troubleshooting
    1. Fixed issues
    2. Known issues

 

Basic steps for creating buttons

  1. Decide what button type best suits your needs.

    Button symbol

    Most people choose button symbols for their flexibility. Button symbols contain a specialized internal timeline for button states. You can easily create visually different Up, Down, and Over states. Button symbols also change their state automatically as they react to user actions.

    Movie clip button

    You can use a movie clip symbol to create sophisticated button effects. Movie clip symbols can contain almost any type of content, including animation. However, movie clip symbols do not have built-in Up, Down, and Over states. You create those states yourself, using ActionScript. A disadvantage is that movie clip files are larger than button files. 

    ActionScript button component

    Use a button component if you require only a standard button or a toggle, and you don’t want to customize it extensively. Both ActionScript 2.0 and 3.0 button components come with built-in code that enables state changes. So, you don’t have to define the look and behavior of button states. Simply drag the component onto the Stage.

    • ActionScript 3.0 button components allow for some customization. You can bind the button to other components, and share and display application data. They have built-in features, such as accessibility support. Button, RadioButton, and CheckBox components are available. 

    • ActionScript 2.0 button components are not customizable. The component enables state changes. 

  2. Define your button states.

    Up frame

    The appearance of the button when the user is not interacting with it.

    Over frame

    The appearance of the button as the user is about to select it.

    Down frame

    The appearance of the button as the user selects it.

    Hit frame

    The area that is responsive to clicks by the user. Defining this Hit frame is optional. If your button is small, or if its graphic area is not contiguous, defining this frame can be useful.

    • The contents of the Hit frame are not visible on the Stage during playback.

    • The graphic for the Hit frame is a solid area large enough to encompass all graphic elements of the Up, Down, and Over frames.

    • If you don’t specify a Hit frame, the image for the Up state is used.

      You can make a button that responds when a different area of the stage is clicked or rolled over (also called a disjoint rollover). Place the Hit frame graphic in a different location than the other button frame graphics.

  3. Associate an action with the button.

    To make something happen when the user selects a button, you add ActionScript code to the Timeline. Place the ActionScript code in the same frames as the buttons. The Code Snippets panel has pre-written ActionScript 3.0 code for many common button uses. See Add interactivity with code snippets.

     ActionScript 2.0 is not compatible with ActionScript 3.0. If your version of Animate uses ActionScript 3.0, you can’t paste ActionScript 2.0 code into your button (and vice versa). Before you paste ActionScript from another source into your buttons, verify that the version is compatible.

Create a button with a button symbol

To make a button interactive, you place an instance of the button symbol on the Stage and assign actions to the instance. You assign the actions to the root timeline of the FLA file. Do not add actions to the timeline of the button symbol. To add actions to the button timeline, use a movie clip button instead.

  1. Choose Edit > Deselect All, or click an empty area of the Stage to ensure that nothing is selected on the Stage.

  2. Choose Insert > New Symbol.

  3. In the Create New Symbol dialog box, enter a name. For the symbol Type, select Button.

    Animate switches to symbol-editing mode. The Timeline changes to display four consecutive frames labeled Up, Over, Down, and Hit. The first frame, Up, is a blank keyframe.

  4. To create the Up state button image, select the Up frame in the Timeline. Then use the drawing tools, import a graphic, or place an instance of another symbol on the Stage.

    You can use graphic symbols or movie clip symbols inside a button, but you cannot use another button symbol.

  5. In the Timeline, click the Over frame, and then choose Insert > Timeline > Keyframe.

    Animate inserts a keyframe that duplicates the contents of the preceding Up frame.

  6. With the Over frame still selected, change or edit the button image on the Stage to create the appearance you want for the Over state.

  7. Repeat steps 5 and 6 for the Down frame and the optional Hit frame.

  8. To assign a sound to a state of the button, select that state’s frame in the Timeline and choose Window > Properties. Then select a sound from the Sound menu in the Property inspector. Only sounds you have already imported appear in the Sound menu.

  9. When you finish, choose Edit > Edit Document. Animate returns you to the main timeline of your FLA file. To create an instance of the button you created on the Stage, drag the button symbol from the Library panel to the Stage.

  10. To test a button’s functionality, use the Control > Test  command. You can also preview the states of a button symbol on the Stage by choosing Control > Enable Simple Buttons. This command allows you to see the up, over, and down states of a button symbol without using Control > Test.

Enable, edit, and test button symbols

By default, Animate keeps button symbols disabled as you create them. Select and then enable a button to see it respond to mouse events. Best practice is to disable buttons as you work and enable them to quickly test their behavior.

  • To select a button, use the Selection tool to drag a selection rectangle around the button.

  • To enable or disable buttons on the Stage, choose Control > Enable Simple buttons. This command acts as a toggle between the two states.

  • To move a button, use the arrow keys.

  • To edit a button, use the Property inspector. If it isn’t visible, choose Windows > Properties.

  • To test the button in the authoring environment, choose Control > Enable Simple Buttons.

  • To test the button in Flash Player, choose Control > Test Movie [or Test Scene] > Test. This method is the only way to test movie clip buttons.

  • To test the button in the Library Preview panel, select the button in the Library and click Play.

Troubleshooting buttons

Use these resources to troubleshoot common problems with buttons:

Additional button resources

The following TechNotes contain instructions for some specific button scenarios:

 Adobe

Get help faster and easier

New user?

Adobe MAX 2024

Adobe MAX
The Creativity Conference

Oct 14–16 Miami Beach and online

Adobe MAX

The Creativity Conference

Oct 14–16 Miami Beach and online

Adobe MAX 2024

Adobe MAX
The Creativity Conference

Oct 14–16 Miami Beach and online

Adobe MAX

The Creativity Conference

Oct 14–16 Miami Beach and online