- June 29, 2009
- |
- No Comments
Loading and using CSS in AS3.
I should make it a habit to post things I know I’m going to forget. For instance, here’s some info on using CSS in Flash:
Supported CSS properties
-
color | color
Only hexadecimal color values are supported. Named colors (such as blue) are not supported. Colors are written in the following format: #FF0000. -
display | display
Supported values are inline, block, and none. -
text-align | textAlign
Recognized values are left, center, right, and justify. -
text-decoration | textDecoration
Recognized values are none and underline. -
text-indent | textIndent
Only the numeric part of the value is used. Units (px, pt) are not parsed; pixels and points are equivalent. -
margin-left | marginLeft
Only the numeric part of the value is used. Units (px, pt) are not parsed; pixels and points are equivalent. -
margin-right | marginRight
Only the numeric part of the value is used. Units (px, pt) are not parsed; pixels and points are equivalent. -
kerning | kerning
Recognized values are true and false. -
letter-spacing | letterSpacing
Only the numeric part of the value is used. Units (px, pt) are not parsed; pixels and points are equivalent. -
font-size | fontSize
Only the numeric part of the value is used. Units (px, pt) are not parsed; pixels and points are equivalent. -
font-family | fontFamily
A comma-separated list of fonts to use, in descending order of desirability. Any font family name can be used. If you specify a generic font name, it is converted to an appropriate device font. The following font conversions are available: mono is converted to _typewriter, sans-serif is converted to _sans, and serif is converted to _serif. -
font-weight | fontWeight
Recognized values are normal and bold. -
display | display
Supported values are inline, block, and none. -
leading | leading
Only the numeric part of the value is used. Units (px, pt) are not parsed; pixels and points are equivalent.
UNDOCUMENTED

Comments