TextField._rotation Property

ActionScript for Flash MX: The Definitive Guide, 2nd Edition
By Colin Moock
Chapter 18.  ActionScript Language Reference
TextField._rotation Property Flash 6

rotation, in degrees, of a text field read/write
theField._rotation

Description

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.

Usage

In order for a text field to be visible when it is rotated, its font must be embedded! See TextField.embedFonts.

Example

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);

See Also

MovieClip._rotation, TextField.embedFonts



    ActionScript for Flash MX. The Definitive Guide
    ActionScript for Flash MX: The Definitive Guide, Second Edition
    ISBN: 059600396X
    EAN: 2147483647
    Year: 2002
    Pages: 780
    Authors: Colin Moock

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net