Deleting Components From Flash Documents; Using Code Hints; Creating Custom Focus Navigation - MACROMEDIA FLASH MX 2004-USING COMPONENTS Use Manual

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

Advertisement

Deleting components from Flash documents

To delete a component's instances from a Flash document, you must delete the component from
the library by deleting the compiled clip icon. It isn't enough to delete the component from the
Stage.
To delete a component from a document:
In the Library panel, select the compiled clip (SWC) symbol.
1.
Click the Delete button at the bottom of the Library panel, or select Delete from the Library
2.
options menu.
In the Delete dialog box, click Delete to confirm the deletion.
3.

Using code hints

When you are using ActionScript 2.0, you can use strict typing for a variable that is based on a
built-in class, including component classes. If you do so, the ActionScript editor displays code
hints for the variable. For example, suppose you type the following:
import mx.controls.CheckBox;
var myCheckBox:CheckBox;
myCheckBox.
As soon as you type the period after
available for CheckBox components, because you have designated the variable as type CheckBox.
For more information, see "Strict data typing" and "Using code hints" in Using ActionScript in
Flash.

Creating custom focus navigation

When a user presses the Tab key to navigate in a Flash application or clicks in an application, the
FocusManager class
FocusManager instance to an application or write any code to activate the Focus Manager.
If a RadioButton object receives focus, the Focus Manager examines that object and all objects
with the same
groupName
to
.
true
Each modal Window component contains an instance of the Focus Manager, so the controls on
that window become their own tab set. This prevents a user from inadvertently navigating to
components in other windows by pressing the Tab key.
To create focus navigation in an application, set the
(including buttons) that should receive focus. When a user presses the Tab key, the
class
looks for an enabled object whose
. Once the
tabIndex
For example, in the following code, the
receives focus first, and then the
var comment:mx.controls.TextArea;
var okButton:mx.controls.Button;
50
Chapter 3: Working with Components
myCheckBox
determines which component receives input focus. You don't need to add a
value and sets focus on the object with the
tabIndex
FocusManager class
reaches the highest
comment
okButton
, Flash displays a list of methods and properties
property on any components
tabIndex
value is greater than the current value of
tabIndex
object (probably a TextArea component)
object receives focus:
property set
selected
FocusManager
property, it returns to 0.

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

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash mx

Table of Contents