![MACROMEDIA Flash Lite 2 Скачать руководство пользователя страница 466](http://html1.mh-extra.com/html/macromedia/flash-lite-2/flash-lite-2_reference_687553466.webp)
466
ActionScript classes
Example
The following example uses the
_framesloaded
property to start a SWF file when all the
frames are loaded. If all the frames aren't loaded, the
_xscale
property of the
bar_mc
movie
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 to Frame 2:
if (this._framesloaded < this._totalframes) {
this.gotoAndPlay(1);
} else {
this.gotoAndStop(3);
}
Place your content on or after Frame 3. Then add the following code to Frame 3:
stop();
See also
MovieClipLoader
getBounds (MovieClip.getBounds method)
public getBounds(bounds:
Object
) : Object
Returns properties that are the minimum and maximum
x
and
y
coordinate values of the
movie clip, based on the
bounds
parameter.
Note:
Use
MovieClip.lcalToGlobal()
and
MovieClip.globalToLocal()
to convert the
movie clip's local coordinates to Stage coordinates, or Stage coordinates to local coordinates,
respectively.
You can extend the methods and event handlers of the MovieClip class by creating a subclass.
Availability:
ActionScript 1.0; Flash Lite 2.0
Parameters
bounds
:
Object
- The target path of the Timeline whose coordinate system you want to use
as a reference point.
Returns
Object
- An object with the properties
xMin
,
xMax
,
yMin
, and
yMax.
Содержание Flash Lite 2
Страница 1: ...Flash Lite 2 x ActionScript Language Reference...
Страница 22: ...22 Contents...
Страница 244: ...244 ActionScript language elements...
Страница 760: ...760 ActionScript classes...