TextField._rotation Property | Flash 6 |
rotation, in degrees, of a text field | read/write |
The floating-point _rotation property specifies the number of degrees theField is rotated about its parent movie's registration point. Both author-time and programmatic adjustments are reflected in _rotation. Numbers in the range of 0 to 180.0 rotate theField clockwise. Numbers in the range of 0 to -180.0 rotate it counterclockwise. See MovieClip._rotation for details on various positive and negative values for rotation, including out-of-range values.
In order for a text field to be visible when it is rotated, its font must be embedded! See TextField.embedFonts.
The following code spins a text field in a circle. It assumes that the Arial font is available on the system at export time.
this.createTextField("spinner_txt", 1, 200, 200, 100, 20); spinner_txt.embedFonts = true; spinner_txt.text = "moock.org"; spinner_txt.setTextFormat(new TextFormat("Arial")); spinner.rotInterval = setInterval(function () {spinner_txt._rotation+=10}, 10);
MovieClip._rotation, TextField.embedFonts