Package | flash.text |
Class | public final class StaticText |
Inheritance | StaticText ![]() ![]() ![]() |
Language Version: | ActionScript 3.0 |
Runtime Versions: | 1.0, 9 |
ArgumentError
.
To create a reference to an existing static text field in ActionScript 3.0, you can iterate over the items in the display list. For example, the following snippet checks to see if the display list contains a static text field and assigns the field to a variable:
var i:uint; for (i = 0; i < this.numChildren; i++) { var displayitem:DisplayObject = this.getChildAt(i); if (displayitem instanceof StaticText) { trace("a static text field is item " + i + " on the display list"); var myFieldLabel:StaticText = StaticText(displayitem); trace("and contains the text: " + myFieldLabel.text); } }
Property | Defined By | ||
---|---|---|---|
![]() | accessibilityProperties : AccessibilityProperties The current accessibility options for this display object. | DisplayObject | |
![]() | alpha : Number Indicates the alpha transparency value of the object specified. | DisplayObject | |
![]() | blendMode : String A value from the BlendMode class that specifies which blend mode to use. | DisplayObject | |
![]() | blendShader : Shader [write-only] Sets a shader that is used for blending the foreground and background. | DisplayObject | |
![]() | cacheAsBitmap : Boolean If set to true, Flash Player caches an internal bitmap representation of the
display object. | DisplayObject | |
![]() | constructor : Object A reference to the class object or constructor function for a given object instance. | Object | |
![]() | filters : Array An indexed array that contains each filter object currently associated with the display object. | DisplayObject | |
![]() | height : Number Indicates the height of the display object, in pixels. | DisplayObject | |
![]() | loaderInfo : LoaderInfo [read-only] Returns a LoaderInfo object containing information about loading the file
to which this display object belongs. | DisplayObject | |
![]() | mask : DisplayObject The calling display object is masked by the specified mask object. | DisplayObject | |
![]() | mouseX : Number [read-only] Indicates the x coordinate of the mouse position, in pixels. | DisplayObject | |
![]() | mouseY : Number [read-only] Indicates the y coordinate of the mouse position, in pixels. | DisplayObject | |
![]() | name : String Indicates the instance name of the DisplayObject. | DisplayObject | |
![]() | opaqueBackground : Object Specifies whether the display object is opaque with a certain background color. | DisplayObject | |
![]() | parent : DisplayObjectContainer [read-only] Indicates the DisplayObjectContainer object that contains this display object. | DisplayObject | |
![]() | prototype : Object [static] A reference to the prototype object of a class or function object. | Object | |
![]() | root : DisplayObject [read-only] For a display object in a loaded SWF file, the root property is the
top-most display object in the portion of the display list's tree structure represented by that SWF file. | DisplayObject | |
![]() | rotation : Number Indicates the rotation of the DisplayObject instance, in degrees, from its original orientation. | DisplayObject | |
![]() | rotationX : Number Indicates the x-axis rotation of the DisplayObject instance, in degrees, from its original orientation relative to the 3D parent container. | DisplayObject | |
![]() | rotationY : Number Indicates the y-axis rotation of the DisplayObject instance, in degrees, from its original orientation relative to the 3D parent container. | DisplayObject | |
![]() | rotationZ : Number Indicates the z-axis rotation of the DisplayObject instance, in degrees, from its original orientation relative to the 3D parent container. | DisplayObject | |
![]() | scale9Grid : Rectangle The current scaling grid that is in effect. | DisplayObject | |
![]() | scaleX : Number Indicates the horizontal scale (percentage) of the object as applied from the registration point. | DisplayObject | |
![]() | scaleY : Number Indicates the vertical scale (percentage) of an object as applied from the registration point of the object. | DisplayObject | |
![]() | scaleZ : Number Indicates the depth scale (percentage) of an object as applied from the registration point of the object. | DisplayObject | |
![]() | scrollRect : Rectangle The scroll rectangle bounds of the display object. | DisplayObject | |
![]() | stage : Stage [read-only] The Stage of the display object. | DisplayObject | |
text : String [read-only] Returns the current text of the static text field. | StaticText | ||
![]() | transform : Transform An object with properties pertaining to a display object's matrix, color transform, and pixel bounds. | DisplayObject | |
![]() | visible : Boolean Whether or not the display object is visible. | DisplayObject | |
![]() | width : Number Indicates the width of the display object, in pixels. | DisplayObject | |
![]() | x : Number Indicates the x coordinate of the DisplayObject instance relative to the local coordinates of
the parent DisplayObjectContainer. | DisplayObject | |
![]() | y : Number Indicates the y coordinate of the DisplayObject instance relative to the local coordinates of
the parent DisplayObjectContainer. | DisplayObject | |
![]() | z : Number Indicates the z coordinate position along the z-axis of the DisplayObject
instance relative to the 3D parent container. | DisplayObject |
text | property |
text:String
[read-only] Language Version: | ActionScript 3.0 |
Runtime Versions: | 1.0, 9 |
Returns the current text of the static text field. The authoring tool may export multiple text field objects comprising the complete text. For example, for vertical text, the authoring tool will create one text field per character.
public function get text():String