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 />

<br />

<br />

<br />

Item 1<br />

Item 2<br />

Item 3<br />

<br />

As the previous example shows, the cont<strong>en</strong>t property can also insert a suffix: a string that appears after the marker,<br />

but before the afterCont<strong>en</strong>t. To insert this string wh<strong>en</strong> providing XML cont<strong>en</strong>t to the flow, wrap the string in<br />

&quote; HTML <strong>en</strong>tities rather than quotation marks ("").<br />

More Help topics<br />

TLF 2.0 Lists Markup<br />

Using padding in TLF<br />

Each FlowElem<strong>en</strong>t supports padding properties that you use to control the position of each elem<strong>en</strong>t’s cont<strong>en</strong>t area,<br />

and the space betwe<strong>en</strong> the cont<strong>en</strong>t areas.<br />

The total width of an elem<strong>en</strong>t is the sum of its cont<strong>en</strong>t’s width, plus the paddingLeft and paddingRight properties.<br />

The total height of an elem<strong>en</strong>t is the sum of its cont<strong>en</strong>t’s height, plus the paddingTop and paddingBottom properties.<br />

The padding is the space betwe<strong>en</strong> the border and the cont<strong>en</strong>t. The padding properties are paddingBottom,<br />

paddingTop, paddingLeft, and paddingRight. Padding can be applied to the TextFlow object, as well as the<br />

following child elem<strong>en</strong>ts:<br />

div<br />

img<br />

li<br />

list<br />

p<br />

Padding properties cannot be applied to span elem<strong>en</strong>ts.<br />

The following example sets padding properties on the TextFlow:<br />

<br />

Valid values for the padding properties are a number (in pixels), “auto”, or “inherit”. The default value is “auto”, which<br />

means it is calculated automatically and set to 0, for all elem<strong>en</strong>ts except the ListElem<strong>en</strong>t. For ListElem<strong>en</strong>ts, “auto” is 0<br />

except on the start side of the list where the value of the listAutoPadding property is used. The default value of<br />

listAutoPadding is 40, which gives lists a default ind<strong>en</strong>t.<br />

The padding properties do not, by default, inherit. The “auto” and “inherit” values are constants defined by the<br />

FormatValue class.<br />

Padding properties can be negative values.<br />

Last updated 6/6/2012<br />

435

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

Saved successfully!

Ooh no, something went wrong!