Flash CS3 Documentation |
|||
| Learning ActionScript 2.0 in Adobe Flash > Working with Text and Strings > Formatting text with Cascading Style Sheet styles > Using style classes | |||
You can create style "classes" (not true ActionScript 2.0 classes) that you can apply to a <p> or <span> tag using either tag's class attribute. When applied to a <p> tag, the style affects the entire paragraph. You can also style a span of text that uses a style class using the <span> tag.
For example, the following style sheet defines two style classes: mainBody and emphasis:
.mainBody {
font-family: Arial,Helvetica,sans-serif;
font-size: 24px;
}
.emphasis {
color: #666666;
font-style: italic;
}
Within HTML text you assign to a text field, you can apply these styles to <p> and <span> tags, as shown in the following snippet:
<p class='mainBody'>This is <span class='emphasis'>really exciting!</span></p>
Flash CS3
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/9.0/main/00000915.html