Style
fontSize
fontStyle
fontWeight
textAlign
textDecoration
Using skins with the Label component
The Label component does not have any visual elements to skin.
Label class
Inheritance
MovieClip >
ActionScript Class Name
The properties of the Label class allow you at runtime to specify text for the label, indicate
whether the text can be formatted with HTML, and indicate whether the label auto-sizes to fit
the text.
Setting a property of the Label class with ActionScript overrides the parameter of the same name
set in the Property inspector or Component inspector.
Each component class has a
available only on the class itself. The
of the component. To access this property, use the following code:
trace(mx.controls.Label.version);
Note: The code
trace(myLabelInstance.version);
Method summary for the Label class
There are no methods exclusive to the Label class.
Methods inherited from the UIObject class
The following table lists the methods the Label class inherits from the UIObject class. When
calling these methods from the Label object, use the form
Method
UIObject.createClassObject()
UIObject.createObject()
Theme Description
Both
The point size for the font. The default value is 10.
Both
The font style: either
is
.
"normal"
Both
The font weight: either
is
. All components can also accept the value
"none"
in place of
"none"
calls to
getStyle()
Both
The text alignment: either
default value is
Both
The text decoration: either
value is
"none"
UIObject class
> Label
mx.controls.Label
property, which is a class property. Class properties are
version
property returns a string that indicates the version
version
Description
Creates an object on the specified class.
Creates a subobject on an object.
or
"normal"
"italic"
or
"none"
"bold"
during a
setStyle()
will return
"none"
,
"left"
"right"
.
"left"
or
"none"
.
returns
.
undefined
labelInstance.methodName
. The default value
. The default value
"normal"
call, but subsequent
.
, or
. The
"center"
. The default
"underline"
.
Label component
445
Need help?
Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?