13.08.2012 Views

ACTIONSCRIPT 3 Developer’s Guide en

ACTIONSCRIPT 3 Developer’s Guide en

ACTIONSCRIPT 3 Developer’s Guide en

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>ACTIONSCRIPT</strong> 3.0 DEVELOPER’S GUIDE<br />

Using the Text Layout Framework<br />

<br />

Item 1<br />

Item 2<br />

Item 3<br />

<br />

You can nest lists within other lists, as the following example shows:<br />

<br />

Item 1<br />

<br />

Item 1a<br />

Item 1b<br />

Item 1c<br />

<br />

Item 2<br />

Item 3<br />

<br />

To customize the type of marker in the list, use the listStyleType property of the ListElem<strong>en</strong>t. This property can be<br />

any value defined by the ListStyleType class (such as check, circle, decimal, and box). The following example<br />

creates lists with various marker types and a custom counter increm<strong>en</strong>t:<br />

<br />

upperAlpha item another lowerAlpha<br />

item another upperRoman item<br />

another <br />

lowerRoman item another <br />

You use the ListMarkerFormat class to define the counter. In addition to defining the increm<strong>en</strong>t of a counter, you can<br />

also customize the counter by resetting it with the counterReset property.<br />

You can further customize the appearance of the markers in your lists by using the beforeCont<strong>en</strong>t and<br />

afterCont<strong>en</strong>t properties of the ListMarkerFormat. These properties apply to cont<strong>en</strong>t that appears before and after<br />

the cont<strong>en</strong>t of the marker.<br />

The following example adds the string “XX” before the marker, and the string “YY” after the marker:<br />

<br />

<br />

<br />

<br />

Item 1<br />

Item 2<br />

Item 3<br />

<br />

The cont<strong>en</strong>t property itself can define further customizations of the marker format. The following example displays<br />

an ordered, uppercase Roman numeral marker:<br />

Last updated 6/6/2012<br />

434

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!