
MovieClip.curveTo() Method
This is the Title of the Book, eMatter Edition
Copyright © 2007 O’Reilly & Associates, Inc. All rights reserved.
Alphabetical Language Reference
|
647
// Make the border match the text size.
_root.welcome_txt.autoSize = true;
// Set the alignment mode of the movie.
Stage.align = "LT";
Stage.scaleMode = "noScale";
// Center the text field any time the movie changes size.
_root.welcome_txt.onResize = function () {
this._x = (Stage.width/2) - (this._width/2);
this._y = (Stage.height/2) - (this._height/2);
}
// Make the text field listen for the Stage.onResize() event.
Stage.addListener(_root.welcome_txt);
// Center the text field manually. This is required in the Standalone Player,
// which does not automatically trigger onResize() when the movie loads.
_root.welcome_txt.onResize();
See Also
MovieClip.createEmptyMovieClip(), TextField.getDepth(), TextField.removeTextField(); the
Stage class, the TextField class
MovieClip._currentframe Property
the frame number of the playhead of a clip or movie
Flash 4
read-only
mc._currentframe
Description
The integer _currentframe property represents the frame number at which the playhead of
mc currently resides. Note that the first frame is 1, not 0; therefore, _currentframe ranges
from 1 to
mc._totalframes.
Example
// Send the playhead backward two frames from its current location
this.gotoAndStop(this._currentframe - 2);
See Also
MovieClip.gotoAndPlay( ...