MovieClip
519
_totalframes (MovieClip._totalframes property)
public _totalframes :
Number
[read-only]
Returns the total number of frames in the movie clip instance specified in the
MovieClip
parameter.
Availability:
ActionScript 1.0; Flash Lite 2.0
Example
In the following example, two movie clip buttons control the Timeline. The
prev_mc
button
moves the playhead to the previous frame, and the
next_mc
button moves the playhead to the
next frame. Add content to a series of frames on the Timeline, and add the following
ActionScript to Frame 1 of the Timeline:
stop();
prev_mc.onRelease = function() {
var parent_mc:MovieClip = this._parent;
if (parent_mc._currentframe>1) {
parent_mc.prevFrame();
} else {
parent_mc.gotoAndStop(parent_mc._totalframes);
}
};
next_mc.onRelease = function() {
var parent_mc:MovieClip = this._parent;
if (parent_mc._currentframe<parent_mc._totalframes) {
parent_mc.nextFrame();
} else {
parent_mc.gotoAndStop(1);
}
};
trackAsMenu (MovieClip.trackAsMenu property)
public trackAsMenu :
Boolean
A Boolean value that indicates whether other buttons or movie clips can receive a release event
from a mouse or stylus. If you drag a stylus or mouse across a movie clip and then release it on
a second movie clip, the
onRelease
event is registered for the second movie clip. This allows
you to create menus for the second movie clip. You can set the
trackAsMenu
property on any
button or movie clip object. If you have not defined the
trackAsMenu
property, the default
behavior is
false
.
Содержание Flash Lite 2
Страница 1: ...Flash Lite 2 x ActionScript Language Reference...
Страница 22: ...22 Contents...
Страница 244: ...244 ActionScript language elements...
Страница 760: ...760 ActionScript classes...