
Label component
215
autoSize
indicates how the label sizes and aligns to fit the text. The default value is none. The
parameter can be any of the following four values:
•
none—the label doesn’t resize or align to fit the text.
•
left—the right and bottom sides of the label resize to fit the text. The left and top sides
don’t resize.
•
center—the bottom side of the label resizes to fit the text. The horizontal center of the label
stays anchored at the its original horizontal center position.
•
right—the left and bottom sides of the label resize to fit the text. The top and right side
don’t resize.
Using styles with the Label component
You can set style properties to change the appearance of a label instance. All text in a Label
component instance must share the same style. For example, you can’t set the
color
style to
"blue"
for one word in a label and to
"red"
for the second word in the same label.
If the name of a style property ends in “Color”, it is a color style property and behaves differently
than non-color style properties. A Label component supports the following styles:
Property summary for the Label class
Style Description
color
The default color for text.
embedFonts
The fonts to embed in the document.
fontFamily
The font name for text.
fontSize
The point size for the font.
fontStyle
The font style, either "normal",or "italic".
fontWeight
The font weight, either "normal" or "bold".
textAlign
The text alignment: either "left", "right", or "center".
textDecoration
The text decoration, either "none" or "underline".
Property Description
Label.autoSize
A string that indicates how a label sizes and aligns to fit the value of its
text
property. There are four possible values:
"none"
,
"left"
,
"center"
, and
"right"
.
The default value is
"none"
.
Label.html
A Boolean value that indicates whether a label can be formatted with HTML (
true
)
or not (
false
).
Label.text
The text on the label.
Summary of Contents for DIRECTOR MX 2004-USING DIRECTOR
Page 1: ...DIRECTOR MX 2004 Using Director...
Page 16: ...16 Chapter 1 Introduction...
Page 82: ...82 Chapter 3 Sprites...
Page 98: ...98 Chapter 4 Animation...
Page 134: ...134 Chapter 5 Bitmaps...
Page 242: ...242 Chapter 10 Sound and Synchronization...
Page 274: ...274 Chapter 11 Using Digital Video...
Page 290: ...290 Chapter 12 Behaviors...
Page 302: ...302 Chapter 13 Navigation and User Interaction...
Page 334: ...334 Chapter 15 The 3D Cast Member 3D Text and 3D Behaviors...
Page 392: ...392 Chapter 16 Working with Models and Model Resources...
Page 418: ...418 Chapter 18 Movies in a Window...
Page 446: ...446 Chapter 22 Managing and Testing Director Projects...