KoolMoves AS3 API Documentation | All Packages | All Classes | Index | Frames No Frames |
Class Label

Package | km.components
Class | public class Label
Inheritance | Label UIComponent flash.display.Sprite
Subclasses | CheckBox, LabelScroll

The Label component class.
A lot of the properties of the Label class are similar to those of the flash.text.TextField class.
It's recommended to study information on that class if you want to know more about them.

Example

    import km.components.*;

    var l:Label = new Label();
    l.text = 'Label';
    l.icon = new BitmapData(8, 8, false, 0xc0b0a0);
    l.move(20,20);
    addChild(l);

See also

flash.text.TextField

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined by
--- | --- | ---
|  | align : String Horizontal alignment within the bounding box. Possible values are 'left', 'right' and 'center'. | Label
|  | antiAliasType : String | Label
|  | background : Boolean | Label
|  | backgroundColor : uint | Label
|  | defaultTextFormat : TextFormat | Label
|  | displayAsPassword : Boolean | Label
|  | duotone : Array The duotone property can be used to convert the colors of the component into duotone. | UIComponent
|  | embedFonts : Boolean | Label
|  | enabled : Boolean Specifies if the component is enabled. If a component is disabled, it will be turned into grayscale and become partly transparent. | UIComponent
|  | gridFitType : String | Label
|  | height : Number | UIComponent
|  | htmlText : String | Label
|  | icon : BitmapData | Label
|  | labelPlacement : String Placement of the label text. Possible values are 'left' and 'right'. | Label
|  | length : int [read-only] | Label
|  | maxChars : int | Label
|  | restrict : String | Label
|  | sharpness : Number | Label
|  | text : String | Label
|  | textColor : uint | Label
|  | thickness : Number | Label
|  | toolTip : String Text to use as toolTip when ToolTip is enabled. | UIComponent
|  | type : String | Label
|  | valign : String Vertical alignment within the bounding box. Possible values are 'top', 'bottom' and 'center'. | Label
|  | width : Number | UIComponent
|  | wordWrap : Boolean | Label
|  | x : Number | UIComponent
|  | y : Number | UIComponent

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined by
--- | --- | ---
|  | Label() The default size of a label is 120 x 20 pixels. | Label
|  | clone():* Returns a clone of the component. The skin of the component is cloned but other things like the text of a label or the items of a list aren't. | UIComponent
|  | move(x:int, y:int, animationMode:int = 0, animationFrames:int = 12, easeInOut:Boolean = false):void Moves the component to the specified coordinates. | UIComponent
|  | setProperties(o:Object):void Sets a number of properties at once. | UIComponent
|  | setSize(w:int, h:int):void Sets the size width and height. | UIComponent

Events
Hide Inherited Events
Show Inherited Events

| Event | Summary | Defined by
--- | --- | --- | ---
|  | animationComplete | The animationComplete event is broadcasted when an animated move is completed. | UIComponent

Property detail

align | property

`align:String` [read-write]

Horizontal alignment within the bounding box.
Possible values are 'left', 'right' and 'center'.

The default value is `'left'`.

Implementation
`public function get align():String`
`public function set align(value:String):void`

antiAliasType | property |

`antiAliasType:String` [read-write]

Implementation
`public function get antiAliasType():String`
`public function set antiAliasType(value:String):void`

background | property |

`background:Boolean` [read-write]

Implementation
`public function get background():Boolean`
`public function set background(value:Boolean):void`

backgroundColor | property |

`backgroundColor:uint` [read-write]

Implementation
`public function get backgroundColor():uint`
`public function set backgroundColor(value:uint):void`

defaultTextFormat | property |

`defaultTextFormat:TextFormat` [read-write]

Implementation
`public function get defaultTextFormat():TextFormat`
`public function set defaultTextFormat(value:TextFormat):void`

displayAsPassword | property |

`displayAsPassword:Boolean` [read-write]

Implementation
`public function get displayAsPassword():Boolean`
`public function set displayAsPassword(value:Boolean):void`

embedFonts | property |

`embedFonts:Boolean` [read-write]

Implementation
`public function get embedFonts():Boolean`
`public function set embedFonts(value:Boolean):void`

gridFitType | property |

`gridFitType:String` [read-write]

Implementation
`public function get gridFitType():String`
`public function set gridFitType(value:String):void`

htmlText | property |

`htmlText:String` [read-write]

Implementation
`public function get htmlText():String`
`public function set htmlText(value:String):void`

icon | property |

`icon:BitmapData` [read-write]

Implementation
`public function get icon():BitmapData`
`public function set icon(value:BitmapData):void`

labelPlacement | property |

`labelPlacement:String` [read-write]

Placement of the label text.
Possible values are 'left' and 'right'.

The default value is `'right'`.

Implementation
`public function get labelPlacement():String`
`public function set labelPlacement(value:String):void`

length | property |

`length:int` [read-only]

Implementation
`public function get length():int`

maxChars | property |

`maxChars:int` [read-write]

Implementation
`public function get maxChars():int`
`public function set maxChars(value:int):void`

restrict | property |

`restrict:String` [read-write]

Implementation
`public function get restrict():String`
`public function set restrict(value:String):void`

sharpness | property |

`sharpness:Number` [read-write]

Implementation
`public function get sharpness():Number`
`public function set sharpness(value:Number):void`

text | property |

`text:String` [read-write]

Implementation
`public function get text():String`
`public function set text(value:String):void`

textColor | property |

`textColor:uint` [read-write]

Implementation
`public function get textColor():uint`
`public function set textColor(value:uint):void`

thickness | property |

`thickness:Number` [read-write]

Implementation
`public function get thickness():Number`
`public function set thickness(value:Number):void`

type | property |

`type:String` [read-write]

Implementation
`public function get type():String`
`public function set type(value:String):void`

valign | property |

`valign:String` [read-write]

Vertical alignment within the bounding box.
Possible values are 'top', 'bottom' and 'center'.

The default value is `'center'`.

Implementation
`public function get valign():String`
`public function set valign(value:String):void`

wordWrap | property |

`wordWrap:Boolean` [read-write]

Implementation
`public function get wordWrap():Boolean`
`public function set wordWrap(value:Boolean):void`
Constructor detail

Label | () | constructor

`public function Label()`

The default size of a label is 120 x 20 pixels.

Last update : 04/05/2008