User Guide
MovieClip 465
Example
This example demonstrates how to hide the yellow rectangle around a specified movie clip
instance in a SWF file when the instance has focus in a browser window. Create three movie
clips called
mc1_mc, mc2_mc, and mc3_mc, and add the following ActionScript to Frame 1 of
the Timeline:
mc1_mc._focusrect = true;
mc2_mc._focusrect = false;
mc3_mc._focusrect = true;
mc1_mc.onRelease = traceOnRelease;
mc3_mc.onRelease = traceOnRelease;
function traceOnRelease() {
trace(this._name);
}
To test the SWF file in a browser window, select File > Publish Preview > HTML. To give the
SWF focus, click it in the browser window and press Tab to focus each instance. You cannot
execute code for this movie clip in the browser by pressing Enter or the Spacebar when
_focusrect is disabled.
You can also test your SWF file in the test environment. Select Control > Disable Keyboard
Shortcuts in the test environment. This allows you to view the focus rectangle around the
instances in the SWF file.
See also
_focusrect property, _focusrect (Button._focusrect property)
_framesloaded (MovieClip._framesloaded property)
public _framesloaded : Number [read-only]
The number of frames that are loaded from a streaming SWF file. This property is useful for
determining whether the contents of a specific frame, and all the frames before it, are loaded
and are available locally in the browser. It is also useful for monitoring the downloading of
large SWF files. For example, you might want to display a message to users indicating that the
SWF file is loading until a specified frame in the SWF file has finished loading.
Availability: ActionScript 1.0; Flash Lite 2.0