Adobe
Products

Top destinations

  • Adobe Creative Cloud
  • Creative Suite
  • Adobe Marketing Cloud
  • Acrobat
  • Photoshop
  • SiteCatalyst
  • Students
  • Elements family

Adobe Creative Cloud

  • What is Adobe Creative Cloud?
  • Design
  • Web
  • Photography
  • Video
  • Students
  • Teams
  • Enterprise
  • Educational institutions

Design and photography

  • Photoshop
  • Illustrator
  • InDesign
  • Adobe Muse
  • Lightroom

Video

  • Adobe Premiere
  • After Effects

Web development and HTML5

  • Edge Tools & Services [opens in a new window]
  • Dreamweaver
  • Gaming [opens in a new window]

Adobe Marketing Cloud

  • What is Adobe Marketing Cloud?
  • Digital analytics
  • Social marketing
  • Web experience management
  • Testing and targeting
  • Media optimization

Analytics

  • SiteCatalyst
  • Adobe Discover
  • Insight

Social

  • Adobe Social

Experience Manager

  • CQ
  • Scene7

Target

  • Test&Target
  • Recommendations
  • Search&Promote

Media Optimizer

  • AdLens
  • AudienceManager
  • AudienceResearch

Document services

  • Acrobat
  • EchoSign [opens in a new window]
  • FormsCentral [opens in a new window]
  • SendNow [opens in a new window]
  • Acrobat.com [opens in a new window]

Publishing

  • Digital Publishing Suite

  • See all products
Business solutions

By business need

  • Digital analytics
  • Digital publishing
  • Document management
  • Media optimization
  • Social marketing
  • Testing and targeting
  • Video editing and serving
  • Web development [opens in a new window]
  • Web experience management
  • See all business needs

By industry

  • Broadcast
  • Education
  • Financial services
  • Government
  • Publishing
  • Retail
  • See all industries
Support & Learning

I need help

  • Products
  • Adobe Creative Cloud
  • Adobe Marketing Cloud
  • Forums [opens in a new window]

I want to learn

  • Training and tutorials
  • Certification [opens in a new window]
  • Adobe Developer Connection
  • Adobe Design Center
  • Adobe TV [opens in a new window]
  • Adobe Marketing Center
  • Adobe Labs [opens in a new window]
Download
  • Product trials
  • Adobe Flash Player
  • Adobe Reader
  • Adobe AIR
  • See all downloads
Company
  • Careers at Adobe
  • Investor Relations
  • Newsroom
  • Privacy
  • Corporate Social Responsibility
  • Customer Showcase
  • Contact us
  • More company info
Buy
  • For personal and professional use
  • For students, educators, and staff
  • For small and medium businesses
  • Volume Licensing
  • Special offers
  • Adobe Marketing Cloud sales [opens in a new window]
Search
 
Info Sign in
Why sign in? Sign in to manage your account and access trial downloads, product extensions, community areas, and more.
Welcome,
My Adobe
My orders
My information
My preferences
My products and services
Sign out
My cart
Privacy My Adobe
Adobe
Products Sections Buy   Search  
Solutions Company
Help Learning
Sign in Sign out Privacy My Adobe
Date Date
Qty:
Subtotal
Promotions
Estimated Shipping
VAT
Calculated at checkout
Total
Checkout
Flash Professional Help / 

Creating buttons

Adobe Community Help


Products Affected

  • Flash Professional CS6

Contact support

 
By clicking Submit, you accept the Adobe Terms of Use.
 

  • Basic steps for creating buttons
  • Create a button with a button symbol
  • Enable, edit, and test button symbols
  • Troubleshooting buttons
  • Additional button resources
To the top

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. Use these resources to learn how to create a button with a movie clip symbol:

    • Tutorial: Movie Clip Buttons (ActionScript 3.0, Schoolofflash.com)

    • Video: Creating a Movie Clip Button (ActionScript 2.0, Kirupa.com)

    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. For details, see Use the Button component in Using Adobe ActionScript 3.0 Components. For examples of how to use Button components, see AS3 Button Component Quick Start.

    • ActionScript 2.0 button components are not customizable. The component enables state changes. For details, see Button component.

  2. Define your button states.

    Up frame

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

    Over frame

    fThe 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.

    Note:

    ActionScript 2.0 is not compatible with ActionScript 3.0. If your version of Flash 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.

To the top

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.

    Flash Pro 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.

    Flash Pro 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. Flash 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 Movie > 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 Movie > Test.

Button symbol tutorials and examples

Some of these items show Flash CS3 or CS4, but still apply to Flash CS5.

  • Video: Creating Buttons (Length: 9:16, tv.adobe.com)

  • Video: Button symbols and interactivity in Flash CS4 (Includes some ActionScript 3.0, tv.adobe.com)

  • Tutorial: Button symbols in Flash (Includes some ActionScript 3.0, Kirupa.com)

  • Example: Animation portfolio piece (Flash Professional) (Adobe.com)

  • Example: ActionScript 3.0 for a button to open a web page (Flashthusiast.com)

  • Example: ActionScript 2.0 for a button to open an web page (Adobe.com)

  • Example: ActionScript 3.0 for buttons to jump to different scenes in the Timeline (Flashthusiast.com)

  • Example: ActionScript 3.0 for multiple buttons on the Stage at the same time (Flashthusiast.com)

  • TechNote: How to create a simple button (Adobe.com)

To the top

Enable, edit, and test button symbols

By default, Flash Pro 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.

To the top

Troubleshooting buttons

Use these resources to troubleshoot common problems with buttons:

  • TechNote: Button hotspots are active even though the buttons are covered with other objects (Adobe.com)

  • TechNote: Adding actions to shared buttons (Adobe.com)

  • Video: Troubleshooting ActionScript 2.0 button symbols (Kirupa.com)

To the top

Additional button resources

The following TechNotes contain instructions for some specific button scenarios:

  • TechNote: How to create a new button (Adobe.com)

  • TechNote: Creating advanced buttons (Adobe.com)

  • TechNote: How can one button do different things at different times? (Adobe.com)

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy

Products

  • Adobe Creative Cloud
  • Creative Suite
  • Adobe Marketing Cloud
  • Acrobat
  • Photoshop
  • Digital Publishing Suite
  • Elements family
  • SiteCatalyst
  • For education

Download

  • Product trials
  • Adobe Reader
  • Adobe Flash Player
  • Adobe AIR

Support & Learning

  • Product help
  • Forums

Buy

  • For personal and professional use
  • For students, educators, and staff
  • For small and medium businesses
  • Volume Licensing
  • Special offers

Company

  • News room
  • Partner programs
  • Corporate social responsibility
  • Career opportunities
  • Investor Relations
  • Events
  • Legal
  • Security
  • Contact Adobe
Choose your region United States (Change)
Choose your region Close

North America

Europe, Middle East and Africa

Asia Pacific

  • Canada - English
  • Canada - Français
  • Latinoamérica
  • México
  • United States

South America

  • Brasil
  • Africa - English
  • Österreich - Deutsch
  • Belgium - English
  • Belgique - Français
  • België - Nederlands
  • България
  • Hrvatska
  • Česká republika
  • Danmark
  • Eastern Europe - English
  • Eesti
  • Suomi
  • France
  • Deutschland
  • Magyarország
  • Ireland
  • Israel - English
  • ישראל - עברית
  • Italia
  • Latvija
  • Lietuva
  • Luxembourg - Deutsch
  • Luxembourg - English
  • Luxembourg - Français
  • الشرق الأوسط وشمال أفريقيا - اللغة العربية
  • Middle East and North Africa - English
  • Moyen-Orient et Afrique du Nord - Français
  • Nederland
  • Norge
  • Polska
  • Portugal
  • România
  • Россия
  • Srbija
  • Slovensko
  • Slovenija
  • España
  • Sverige
  • Schweiz - Deutsch
  • Suisse - Français
  • Svizzera - Italiano
  • Türkiye
  • Україна
  • United Kingdom
  • Australia
  • 中国
  • 中國香港特別行政區
  • Hong Kong S.A.R. of China
  • India - English
  • 日本
  • 한국
  • New Zealand
  • 台灣

Southeast Asia

  • Includes Indonesia, Malaysia, Philippines, Singapore, Thailand, and Vietnam - English

Copyright © 2013 Adobe Systems Incorporated. All rights reserved.

Terms of Use | Privacy | Cookies

Ad Choices

Reviewed by TRUSTe: site privacy statement