mc3_mc.onRelease = traceOnRelease;
function traceOnRelease() {
trace(this._name);
}
Test the SWF file in a browser window by selecting File > Publish Preview > HTML. Give the
SWF focus by clicking 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
is disabled.
_focusrect
Additionally, you can test your SWF file in the test environment. Select Control > Disable
Keyboard Shortcuts from the main menu in the test environment. This allows you to view the
focus rectangle around the instances in the SWF file.
See also
_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 Player 4
Example
The following example uses the
frames are loaded. If all the frames aren't loaded, the
clip instance is increased proportionally to create a progress bar.
Enter the following ActionScript in Frame 1 of the Timeline:
var pctLoaded:Number = Math.round(this.getBytesLoaded()/
this.getBytesTotal()*100);
bar_mc._xscale = pctLoaded;
Add the following code on Frame 2:
if (this._framesloaded < this._totalframes) {
this.gotoAndPlay(1);
} else {
this.gotoAndStop(3);
}
,
_focusrect (Button._focusrect property)
_framesloaded
property to start a SWF file when all the
property of the
_xscale
movie
bar_mc
MovieClip
861
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?