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

  1. color | color

    Only hexadecimal color values are supported. Named colors (such as blue) are not supported. Colors are written in the following format: #FF0000.

  2. display | display

    Supported values are inline, block, and none.

  3. text-align | textAlign

    Recognized values are left, center, right, and justify.

  4. text-decoration | textDecoration

    Recognized values are none and underline.

  5. text-indent | textIndent

    Only the numeric part of the value is used. Units (px, pt) are not parsed; pixels and points are equivalent.

  6. margin-left | marginLeft

    Only the numeric part of the value is used. Units (px, pt) are not parsed; pixels and points are equivalent.

  7. margin-right | marginRight

    Only the numeric part of the value is used. Units (px, pt) are not parsed; pixels and points are equivalent.

  8. kerning | kerning

    Recognized values are true and false.

  9. letter-spacing | letterSpacing

    Only the numeric part of the value is used. Units (px, pt) are not parsed; pixels and points are equivalent.

  10. font-size | fontSize

    Only the numeric part of the value is used. Units (px, pt) are not parsed; pixels and points are equivalent.

  11. 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.

  12. font-weight | fontWeight

    Recognized values are normal and bold.

  13. display | display

    Supported values are inline, block, and none.


  14. UNDOCUMENTED

  15. leading | leading

    Only the numeric part of the value is used. Units (px, pt) are not parsed; pixels and points are equivalent.

Comments