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

Package | km.components
Class | public class BitmapLabel
Inheritance | BitmapLabel UIComponent flash.display.Sprite

The BitmapLabel component class.
The BitmapLabel class has a bitmap text instead of a normal dynamic text to allow for text rotation.
A lot of the properties of the BitmapLabel 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:BitmapLabel = new BitmapLabel();
    l.setSize(20,120);
    l.move(20,20);

    l.icon = new BitmapData(8, 8, false, 0xc0b0a0);
    l.textRotation = 270;
    l.labelPlacement = 'top';
    l.align = 'center';
    l.valign = 'bottom';
    l.text = 'Label';

    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'. | BitmapLabel
|  | background : Boolean | BitmapLabel
|  | backgroundColor : uint | BitmapLabel
|  | defaultTextFormat : TextFormat | BitmapLabel
|  | duotone : Array The duotone property can be used to convert the colors of the component into duotone. | UIComponent
|  | embedFonts : Boolean | BitmapLabel
|  | enabled : Boolean Specifies if the component is enabled. If a component is disabled, it will be turned into grayscale and become partly transparent. | UIComponent
|  | height : Number | UIComponent
|  | htmlText : String | BitmapLabel
|  | icon : BitmapData | BitmapLabel
|  | labelPlacement : String Placement of the label text. Possible values are 'left', 'right', 'top' and 'bottom'. | BitmapLabel
|  | length : int [read-only] | BitmapLabel
|  | text : String | BitmapLabel
|  | textColor : uint | BitmapLabel
|  | textRotation : int Rotation of the text. Possible values are 0, 90, 180 and 270. | BitmapLabel
|  | toolTip : String Text to use as toolTip when ToolTip is enabled. | UIComponent
|  | valign : String Vertical alignment within the bounding box. Possible values are 'top', 'bottom' and 'center'. | BitmapLabel
|  | width : Number | UIComponent
|  | wordWrap : Boolean | BitmapLabel
|  | x : Number | UIComponent
|  | y : Number | UIComponent

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined by
--- | --- | ---
|  | BitmapLabel() The default size of a bitmap label is 120 x 20 pixels. | BitmapLabel
|  | 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`

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`

embedFonts | property |

`embedFonts:Boolean` [read-write]

Implementation
`public function get embedFonts():Boolean`
`public function set embedFonts(value:Boolean):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', 'right', 'top' and 'bottom'.

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`

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`

textRotation | property |

`textRotation:int` [read-write]

Rotation of the text.
Possible values are 0, 90, 180 and 270.

Implementation
`public function get textRotation():int`
`public function set textRotation(value:int):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

BitmapLabel | () | constructor

`public function BitmapLabel()`

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

Last update : 04/05/2008