SlickBoard | CSS/XML Timeline (new) | XML/SWF Charts | Timeline Eons

 < previous 

 

Stylesheet

 

<stylesheet>

   <style id='string'
          color='string'
          display='string'
          fontFamily='string'
          fontSize='number'
          fontStyle='string'
          fontWeight='string'
          kerning='boolean'
          leading='number''
          letterSpacing='number'
          marginLeft='number'
          marginRight='number'
          textAlign='string'
          textDecoration='string'
          textIndent='number'
          />
          
     <style ... />
   
</stylesheet>
            


Description

Stylesheet defines one or more styles to apply to different paragraphs in one text tag. The style attributes are a subset of the Cascading Style Sheet (CSS) specification and follow Flash's ActionScript naming convention.

Only non-embedded fonts can be used with stylesheet.

 

The style attributes are:

  • id: The name of the style to add to the style sheet. If the same ID is used by multiple styles, then the last loaded style replaces the existing one.

  • color: The style's color. This is a string holding triple hexadecimal values representing the red, green, and blue components of a color. The default is "000000" (black).

  • fontFamily: A comma-separated list of fonts to use in descending order of desirability. Font names are case sensitive and must match the exact system names. If you specify a generic font name, it is converted to an appropriate device font. The following generic names are available: mono, sans-serif, and serif.

  • fontSize: The font's size.

  • fontStyle: Valid values are normal and italic.

  • fontWeight: Valid values are normal and bold.

  • leading: The amount of space that is uniformly distributed between lines. The value specifies the number of pixels that are added after each line. A negative value condenses the space between lines.

  • letterSpacing: The amount of space that is uniformly distributed between characters. The value specifies the number of pixels that are added after each character. A negative value condenses the space between characters.

  • marginLeft: The number of pixels used as left margin.

  • marginRight: The number of pixels used as the right margin.

  • textAlign: Valid values are left, center, right, and justify.

  • textDecoration: Valid values are none and underline.

  • textIndent: The indentation that appears before the first formatted line. By default, the first line is always indented. This value increases the default indentation.

 


Style Scope

The stylesheet tags can be placed within any object. However, they must be loaded with or before the object that makes use of them. Styles loaded by an object benefit both that object and its children, but styles loaded by a child object do not benefit its parent.

To make styles available to all objects, place the stylesheet tags at the top level of the XML Source (outside of any <object> tags).

 

Example

<slickboard>
   
   <stylesheet>
      <style id='body' color='9999ff' fontFamily='"Times New Roman", serif' fontSize='20' />
      <style id='.heading' color='ff4400' fontFamily='Arial, sans-serif' fontSize='60' fontWeight='bold' />   
   </stylesheet>      

   <text x='50' y='50' width='400' height='400'>
      <body>
      <p class='heading'>Car:</p>
      <p>A vehicle with four wheels that carries people.</p>
      </body>
   </text>

</slickboard>

 

 < previous 


Copyright © 2010-2017, maani.us