| Package | flare.display |
| Class | public class TextSprite |
| Inheritance | TextSprite DirtySprite flash.display.Sprite |
| Subclasses | AxisLabel |
| Property | Defined by | ||
|---|---|---|---|
![]() | angle : Number The angle value of this sprite's position in polar co-ordinates.
| DirtySprite | |
| bitmap : Bitmap [read-only] The bitmap of the text, if in BITMAP mode.
| TextSprite | ||
| bold : Boolean
The boldness of the text.
| TextSprite | ||
| color : uint
The color of the text.
| TextSprite | ||
| font : String
The font to the text.
| TextSprite | ||
![]() | height : Number
If dirty, this sprite is re-rendered before returning the height.
| DirtySprite | |
| horizontalAnchor : int
The horizontal anchor for the text, one of LEFT, RIGHT, or CENTER.
| TextSprite | ||
| htmlText : String
The html text shown by this TextSprite.
| TextSprite | ||
| italic : Boolean
The italics of the text.
| TextSprite | ||
| kerning : Boolean
The kerning of the text.
| TextSprite | ||
| letterSpacing : int
The letter-spacing of the text.
| TextSprite | ||
![]() | origin : Point The origin point for polar coordinates.
| DirtySprite | |
![]() | radius : Number The radius value of this sprite's position in polar co-ordinates.
| DirtySprite | |
| size : Number
The size of the text.
| TextSprite | ||
| text : String
The text shown by this TextSprite.
| TextSprite | ||
| textField : TextField [read-only] The TextField instance backing this TextSprite.
| TextSprite | ||
| textFormat : TextFormat The default text format for this text sprite.
| TextSprite | ||
| textMode : int
The text rendering mode for this TextSprite, one of BITMAP,
DEVICE, or EMBED.
| TextSprite | ||
| underline : Boolean
The underline of the text.
| TextSprite | ||
| verticalAnchor : int
The vertical anchor for the text, one of TOP, BOTTOM, or MIDDLE.
| TextSprite | ||
![]() | width : Number
If dirty, this sprite is re-rendered before returning the width.
| DirtySprite | |
![]() | x : Number | DirtySprite | |
![]() | y : Number | DirtySprite | |
| Method | Defined by | ||
|---|---|---|---|
|
TextSprite(text:String = null, format:TextFormat = null, mode:int)
Creates a new TextSprite instance.
| TextSprite | ||
|
applyFormat(fmt:TextFormat):void
Applies the settings of the input text format to this sprite's
internal text format.
| TextSprite | ||
![]() |
dirty():void
Marks this sprite as "dirty" and in need of re-rendering.
| DirtySprite | |
![]() |
getBounds(targetCoordinateSpace:DisplayObject):Rectangle
If dirty, this sprite is re-rendered returning the bounds.
| DirtySprite | |
![]() |
getRect(targetCoordinateSpace:DisplayObject):Rectangle
If dirty, this sprite is re-rendered before returning the rect.
| DirtySprite | |
![]() |
hitTestObject(obj:DisplayObject):Boolean
If dirty, either sprite is re-rendered before hit-testing.
| DirtySprite | |
![]() |
hitTestPoint(x:Number, y:Number, shapeFlag:Boolean = false):Boolean
If dirty, this sprite is re-rendered before hit-testing.
| DirtySprite | |
|
render():void
Draw this sprite's graphical content.
| TextSprite | ||
![]() |
renderDirty(evt:Event = null):void
[static]
Frame render callback that renders all sprites on the dirty list.
| DirtySprite | |
![]() |
toString():String
| DirtySprite | |
| Method | Defined by | ||
|---|---|---|---|
|
setMode(mode:int):void
| TextSprite | ||
| Constant | Defined by | ||
|---|---|---|---|
| BITMAP : uint = 2 [static]
Constant indicating that text should be rendered into a Bitmap
instance.
| TextSprite | ||
| BOTTOM : int = 2 [static]
Constant for vertically aligning the bottom of the text field
to a TextSprite's y-coordinate.
| TextSprite | ||
| CENTER : int = 1 [static]
Constant for horizontally aligning the center of the text field
to a TextSprite's x-coordinate.
| TextSprite | ||
| DEVICE : uint = 0 [static]
Constant indicating that text should be rendered using a TextField
instance using device fonts.
| TextSprite | ||
| EMBED : uint = 1 [static]
Constant indicating that text should be rendered using a TextField
instance using embedded fonts.
| TextSprite | ||
| LEFT : int = 0 [static]
Constant for horizontally aligning the left of the text field
to a TextSprite's x-coordinate.
| TextSprite | ||
| MIDDLE : int = 1 [static]
Constant for vertically aligning the middle of the text field
to a TextSprite's y-coordinate.
| TextSprite | ||
| RIGHT : int = 2 [static]
Constant for horizontally aligning the right of the text field
to a TextSprite's x-coordinate.
| TextSprite | ||
| TOP : int = 0 [static]
Constant for vertically aligning the top of the text field
to a TextSprite's y-coordinate.
| TextSprite | ||
![]() | ZERO : Point [static] A constant for the point (0,0).
| DirtySprite | |
| bitmap | property |
bitmap:Bitmap [read-only]The bitmap of the text, if in BITMAP mode.
Implementation public function get bitmap():Bitmap
| bold | property |
bold:Boolean [read-write]The boldness of the text.
Implementation public function get bold():Boolean
public function set bold(value:Boolean):void
| color | property |
color:uint [read-write]The color of the text.
Implementation public function get color():uint
public function set color(value:uint):void
| font | property |
font:String [read-write]The font to the text.
Implementation public function get font():String
public function set font(value:String):void
| horizontalAnchor | property |
horizontalAnchor:int [read-write]The horizontal anchor for the text, one of LEFT, RIGHT, or CENTER. This setting determines how the text is horizontally aligned with respect to this TextSprite's (x,y) location.
Implementation public function get horizontalAnchor():int
public function set horizontalAnchor(value:int):void
| htmlText | property |
htmlText:String [read-write]The html text shown by this TextSprite.
Implementation public function get htmlText():String
public function set htmlText(value:String):void
| italic | property |
italic:Boolean [read-write]The italics of the text.
Implementation public function get italic():Boolean
public function set italic(value:Boolean):void
| kerning | property |
kerning:Boolean [read-write]The kerning of the text.
Implementation public function get kerning():Boolean
public function set kerning(value:Boolean):void
| letterSpacing | property |
letterSpacing:int [read-write]The letter-spacing of the text.
Implementation public function get letterSpacing():int
public function set letterSpacing(value:int):void
| size | property |
size:Number [read-write]The size of the text.
Implementation public function get size():Number
public function set size(value:Number):void
| text | property |
text:String [read-write]The text shown by this TextSprite.
Implementation public function get text():String
public function set text(value:String):void
| textField | property |
textField:TextField [read-only]The TextField instance backing this TextSprite.
Implementation public function get textField():TextField
| textFormat | property |
textFormat:TextFormat [read-write]The default text format for this text sprite.
Implementation public function get textFormat():TextFormat
public function set textFormat(value:TextFormat):void
| textMode | property |
textMode:int [read-write]The text rendering mode for this TextSprite, one of BITMAP, DEVICE, or EMBED.
Implementation public function get textMode():int
public function set textMode(value:int):void
| underline | property |
underline:Boolean [read-write]The underline of the text.
Implementation public function get underline():Boolean
public function set underline(value:Boolean):void
| verticalAnchor | property |
verticalAnchor:int [read-write]The vertical anchor for the text, one of TOP, BOTTOM, or MIDDLE. This setting determines how the text is vertically aligned with respect to this TextSprite's (x,y) location.
Implementation public function get verticalAnchor():int
public function set verticalAnchor(value:int):void
| TextSprite | () | constructor |
public function TextSprite(text:String = null, format:TextFormat = null, mode:int)Creates a new TextSprite instance.
Parameterstext:String (default = null) — the text string for this label
|
|
format:TextFormat (default = null) — the TextFormat determining font family, size, and style
|
|
mode:int — the text rendering mode to use (BITMAP by default)
|
| applyFormat | () | method |
public function applyFormat(fmt:TextFormat):voidApplies the settings of the input text format to this sprite's internal text format. This method makes a shallow copy of the input format, it does not save a reference to it.
Parametersfmt:TextFormat — the text format to apply
|
| render | () | method |
public override function render():voidDraw this sprite's graphical content. Subclasses should override this method with custom drawing code.
| setMode | () | method |
protected function setMode(mode:int):voidParameters
mode:int |
| BITMAP | constant |
public static const BITMAP:uint = 2Constant indicating that text should be rendered into a Bitmap instance.
| BOTTOM | constant |
public static const BOTTOM:int = 2Constant for vertically aligning the bottom of the text field to a TextSprite's y-coordinate.
| CENTER | constant |
public static const CENTER:int = 1Constant for horizontally aligning the center of the text field to a TextSprite's x-coordinate.
| DEVICE | constant |
public static const DEVICE:uint = 0Constant indicating that text should be rendered using a TextField instance using device fonts.
| EMBED | constant |
public static const EMBED:uint = 1Constant indicating that text should be rendered using a TextField instance using embedded fonts. For this mode to work, the fonts used must be embedded in your application SWF file.
| LEFT | constant |
public static const LEFT:int = 0Constant for horizontally aligning the left of the text field to a TextSprite's x-coordinate.
| MIDDLE | constant |
public static const MIDDLE:int = 1Constant for vertically aligning the middle of the text field to a TextSprite's y-coordinate.
| RIGHT | constant |
public static const RIGHT:int = 2Constant for horizontally aligning the right of the text field to a TextSprite's x-coordinate.
| TOP | constant |
public static const TOP:int = 0Constant for vertically aligning the top of the text field to a TextSprite's y-coordinate.