MACROMEDIA FLASH MX 2004-USING COMPONENTS Use Manual page 660

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

Advertisement

screen2
subscreen1_2
If
has focus, the leafmost screen containing the focus is
myUIButton
what
currentFocusedScreen
all contain the focus but the one that is "closest" (in the screen hierarchy) to the
subscreen1_1
leaves of the tree (that is, farthest away from the root) is
Example
The following example displays the name of the currently focused screen in the Output panel.
var currentFocus:mx.screens.Screen = mx.screens.Screen.currentFocusedScreen;
trace("Current screen is: " + currentFocus._name);
Screen.getChildScreen()
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX Professional 2004.
Usage
myScreen.getChildScreen(childIndex)
Parameters
A number that indicates the zero-based index of the child screen to return.
childIndex
Returns
A Screen object.
Description
Method; returns the child screen of
Example
The following example sends the names of all the child screens belonging to the root screen
named
Presentation
for (var i:Number = 0; i < _root.Presentation.numChildScreens; i++) {
var childScreen:mx.screens.Screen = _root.Presentation.getChildScreen(i);
trace(childScreen._name);
}
660
Chapter 6: Components Dictionary
would return. In this case,
myScreen
to the Output panel.
presentation
subscreen1_1
whose index is
childIndex
, which is
subscreen1_1
,
, and
screen1
.
.

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?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash mx

Table of Contents