MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT Reference Manual page 612

Actionscript reference guide
Hide thumbs Also See for FLASH MX 2004 - ACTIONSCRIPT:
Table of Contents

Advertisement

Selection.setFocus()
Availability
Flash Player 5. Instance names for buttons and movie clips work only in Flash Player 6 and later.
Usage
Selection.setFocus("instanceName")
Parameters
instanceName
text field.
Returns
An event.
Description
Method; gives focus to the selectable (editable) text field, button, or movie clip specified by
. The
instanceName
You can use dot or slash notation to specify the path. You can also use a relative or absolute path.
If you are using ActionScript 2.0, you must use dot notation.
If
is passed, the current focus is removed.
null
Example
The following example gives focus to a text field associated with
Because the
instanceName
any Timeline.
Selection.setFocus("_root.myVar");
In the following example, the text field associated with
the main Timeline. You can use either of the following two paths to set focus; the first is relative
and the second is absolute.
Selection.setFocus("myClip.myVar");
Selection.setFocus("_root.myClip.myVar");
Selection.setSelection()
Availability
Flash Player 5.
Usage
Selection.setSelection(start, end)
Parameters
The beginning index of the selection span.
start
The ending index of the selection span.
end
612
Chapter 12: ActionScript Dictionary
A string specifying the path to the instance name of a button, movie clip, or
parameter must be a string literal of the path to the instance.
instanceName
parameter is an absolute path, you can call the action from
, on the main Timeline.
myVar
is in a movie clip called
myVar
on
myClip

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Subscribe to Our Youtube Channel

Table of Contents