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 / 

Create buttons | Flash

Adobe Community Help


Products Affected

  • Flash Professional

Contact support

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

What's covered

  • Create a basic button
  • Assign a simple action to a button (Flash 5)
  • Assign a simple action to a button (Flash 4 and earlier)
  • Create advanced buttons
  • Invisible buttons
  • Buttons with animated states
  • A rollover in one area of the movie affects another area of the movie
  • Example
  • Additional information
  • Show All Show Less

Buttons are symbols that contain four frames. Each frame of a button symbol represents a different state for the button: Up, Over, Down, and Hit. These states determine how a button visually behaves when the mouse is rolled over it or when the user clicks the button. This document explains how to create basic and advanced buttons.

To the top

Create a basic button

  1. Choose Insert > New Symbol, or press Control+F8 (Windows) or Command+F8 (Mac OS).

    Note: In Flash 3 and earlier, deselect everything on the stage and choose Insert > Create Symbol.
  2. In the Symbol Properties dialog box, enter a name for the new button symbol and choose Button as the Behavior option. Click OK. 

    Flash switches to symbol-editing mode. The Timeline header changes to display four consecutive frames labeled Up, Over, Down, and Hit. The first frame, Up, is a blank keyframe.
  3. To create the Up state button image, use the drawing tools, import a graphic, or place an instance of another symbol on the Stage. You can use either a movie clip or graphic symbol in a button. However you cannot use another button in a button. Use movie clip symbols if you want to create an animated button.
  4. Select the second frame, labeled Over, and choose Insert > Keyframe. The button image from the first frame appears on the Stage.
  5. Change the button image for the Over state. Repeat steps 4 and 5 for the Down frame and the Hit frame.

    Note: The Hit frame is not visible on the Stage on playback, but it defines the area of the button that responds when clicked. Make sure that the Hit frame graphic is a solid area large enough to encompass all the graphic elements of the Up, Down, and Over frames. It can also be larger than the visible button. If you do not specify a hit frame, the objects in the Up state are used as the hit frame.
  6. After you define the images of the four button states, choose Edit > Edit Movie to exit Symbol Edit mode.
  7. Open the Library window by choosing Window > Library. Locate the button in the Library window and then drag the button symbol out of the Library onto the Stage. This step creates an instance of the button in the movie.

For information on assigning actions to the button instance, see the documentation that applies the version of Flash that you are using. The documentation follows below:

Assign a simple action to a button (Flash 5)

  1. In Edit Movie mode, select the button instance created in Step 7 above.
  2. Choose Window > Actions to open the Actions panel.
  3. In the Toolbox list on the left side of the panel, click the Basic Actions category to display the basic actions.
  4. To assign an action, do one of the following:
    • Double-click an action in the Basics Actions category.
    • Drag an action from the Basic Actions category on the left to the Actions list on the right side of the panel.
    • Click the Add (+) button and choose an action from the pop-up menu.
    • Use the keyboard shortcut.
  5. If the chosen action has any associated parameters, those parameters appear in the Parameter pane at the bottom of the Actions panel. (If the Parameter pane is not visible click the small triangle in the lower right corner of the panel.) Choose or type the parameters appropriate for that action. For example, thegotoAndPlay action shown below contains three parameters: Scene, Type, Frame, and an option for Goto and Play.





Assign a simple action to a button (Flash 4 and earlier)

  1. In Edit Movie mode, select the button instance created in Step 7 above.
  2. Make sure that Enable Buttons from the Control menu is deselected.
  3. Double-click the button to get the Instance Properties dialog box.

    Note: In Flash 2, this dialog box was the Link Properties: Button dialog box.
  4. Assign the action by selecting the Action tab in the Instance Properties dialog box. Then, click the plus (+) button and double-click the appropriate action.

    Note: In Flash 2 assign the action using the Action pop-up menu in the Link Properties: Button dialog box. Only one action can be assigned to the button.
  5. Make sure that Enable Buttons in the Control menu is checked, so that option is toggled back on.
  6. If the selected action has any associated parameters, those parameters appear in the Parameter panel on the right side of the Actions panel. Choose or type the parameters appropriate for that action.
To the top

Create advanced buttons

After you've mastered a simple button, try more complex Flash buttons. You can create invisible buttons, buttons with animated states, and buttons with rollover effects. 

Hit states are important to understand when designing a complex button. The button's shape and area represent the active area of the button. To experiment with the Hit state, do the following:

  1. Introduce a button from the Common Libraries onto the Stage. Edit the button.
  2. Highlight the frame in the button's Hit state, and insert a Keyframe. Test this behavior in a movie.
  3. Resize the object in the Hit state dramatically, and test.
  4. Delete the Keyframe in the Hit State and test the button.
  5. Notice the effect on your button cursor, and the Up, Over and Down states that you see when the button is enabled. 

Invisible buttons

The Up, Over and Down states of a button can be left empty. If these states are empty, it's necessary to define the Hit state so that it contains content.

When the Up state of the button is empty or invisible, the button is represented on the Stage by a blue shape. The shape is the equivalent to the content in the next Keyframe within the button. This blue shape isn't visible in your final movie. See the example below.

Buttons with animated states

To make animated buttons in Flash, place a Movie Clip in the button state that you are animating.

  1. Create a movie clip for each state of the button that you want animated.
  2. Create the button.
  3. Place the movie clips in the button states to animate.
  4. Place the button on the stage. 

    Note: Movie clips cannot be tested in the Flash editor. Choose Control > Test Movie or export it as a SWF file to test it.

See the example below.

A rollover in one area of the movie affects another area of the movie

To create this effect, move the Hit state elements to a different area of the Stage than elements in the Over state of the button. This method works for simple rollover effects. The active area of the button is located in a different area onstage than the rollover effect. See the example below

Example

Note: Flash Player is required to view the example.

  • Download the Windows source file advanced_buttons.zip (17 K)
  • Download the Mac OS source file advanced_buttons.sit (18 K)

Note: Flash 4 or later is required to open the source file.

To the top

Additional information

A good way to learn more about buttons and their construction is to study the buttons included as samples with Flash. In Flash 5, these sample buttons are available from the Windows > Common Libraries > Buttons menu. If you use Flash 4, you can access these buttons by choosing Libraries > Buttons. For Flash 2, the libraries of sample buttons are accessible from the Xtras menu.

A walkthrough of creating a button is also available in the Lessons that come with Flash 5. Choose Help > Lessons > 06 Buttons from within Flash to access this lesson.

See Also

  • How to create a pop-up menu in Flash
  • How to create a reset button
Keywords: tn_4101

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