Button Component - MACROMEDIA FLASH MX 2004-USING COMPONENTS Use Manual

Using components
Hide thumbs Also See for FLASH MX 2004-USING COMPONENTS:
Table of Contents

Advertisement

Button component

The Button component is a resizable rectangular user interface button. You can add a custom
icon to a button. You can also change the behavior of a button from push to toggle. A toggle
button stays pressed when clicked and returns to its up state when clicked again.
A button can be enabled or disabled in an application. In the disabled state, a button doesn't
receive mouse or keyboard input. An enabled button receives focus if you click it or tab to it.
When a Button instance has focus, you can use the following keys to control it:
Key
Shift+Tab
Spacebar
Tab
For more information about controlling focus, see
on page 50
or
"FocusManager class" on page
A live preview of each Button instance reflects changes made to parameters in the Property
inspector or Component inspector during authoring. However, in the live preview a custom icon
is represented on the Stage by a gray square.
When you add the Button component to an application, you can use the Accessibility panel to
make it accessible to screen readers. First, you must add the following line of code:
mx.accessibility.ButtonAccImpl.enableAccessibility();
You enable accessibility for a component only once. regardless of how many instances you have of
the component.
Using the Button component
A button is a fundamental part of any form or web application. You can use buttons wherever you
want a user to initiate an event. For example, most forms have a Submit button. You could also
add Previous and Next buttons to a presentation.
To add an icon to a button, you need to select or create a movie clip or graphic symbol to use as
the icon. The symbol should be registered at 0,0 for appropriate layout on the button. Select the
icon symbol in the Library panel, open the Linkage dialog box from the Library options menu,
and enter a linkage identifier. This is the value to enter for the icon parameter in the Property
inspector or Component inspector. You can also enter this value for the
ActionScript property.
Note: If an icon is larger than the button, it extends beyond the button's borders.
To designate a button as the default push button in an application (the button that receives the
click event when a user presses Enter), use
Description
Moves focus to the previous object.
Presses or releases the component and triggers the
Moves focus to the next object.
419.
FocusManager.defaultPushButton
Components Dictionary
"Creating custom focus navigation"
Button.icon
CHAPTER 6
event.
click
.
Button component
131

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Flash mx

Table of Contents