EasyManua.ls Logo

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE - Rotation (Textfield._Rotation Property)

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
1378 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
1204 ActionScript classes
Example
The following example allows only uppercase characters, spaces, and numbers to be entered
into a text field:
my_txt.restrict = "A-Z 0-9";
The following example includes all characters, but excludes lowercase letters:
my_txt.restrict = "^a-z";
You can use a backslash to enter a ^ or - verbatim. The accepted backslash sequences are \-, \^
or \\. The backslash must be an actual character in the string, so when specified in
ActionScript, a double backslash must be used. For example, the following code includes only
the dash (-) and caret (^):
my_txt.restrict = "\\-\\^";
The ^ may be used anywhere in the string to toggle between including characters and
excluding characters. The following code includes only uppercase letters, but excludes the
uppercase letter Q:
my_txt.restrict = "A-Z^Q";
You can use the \u escape sequence to construct restrict strings. The following code
includes only the characters from ASCII 32 (space) to ASCII 126 (tilde).
my_txt.restrict = "\u0020-\u007E";
_rotation (TextField._rotation property)
public _rotation : Number
The rotation of the text field, in degrees, from its original orientation. Values from 0 to 180
represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.
Values outside this range are added to or subtracted from 360 to obtain a value within the
range. For example, the statement
my_txt._rotation = 450 is the same as
my_txt._rotation = 90.
Rotation values are not supported for text fields that use device fonts. You must use embedded
fonts to use
_rotation with a text field.
Availability: ActionScript 1.0; Flash Player 6
Example
In this example, you need to create a dynamic text field called
my_txt, and then use the
following ActionScript to embed fonts and rotate the text field. The reference to
my font
refers to a Font symbol in the library, with linkage set to
my font.
var my_fmt:TextFormat = new TextFormat();
my_fmt.font = "my font";

Table of Contents

Related product manuals