Using style classes
You can create style "classes" that you can apply to a
attribute. When applied to a
span of text that uses a style class by using the
For example, the following style sheet defines two styles classes:
.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
as shown below.
<p class="mainBody">This is <span class="emphasis">really exciting!</span></p>
Styling built-in HTML tags
Flash Player supports a subset of HTML tags. (For more information, see
formatted text" on page
tag that appears in a text field. For example, the following defines a style for the built-in
HTML tag. All instances of that tag will be styled in the manner specified by the style rule.
p {
font-family: Arial,Helvetica,sans-serif;
font-size: 12px;
display: inline;
}
The following table shows which built-in HTML tags can be styled and how each style is applied:
Style name
p
body
li
a
a:link
a:hover
a:active
tag, the style affects the entire paragraph. You can also style a
<p>
147.) You can assign a CSS style to every instance of a built-in HTML
How the style is applied
Affects all
tags.
<p>
Affects all
tags. The
<body>
style.
Affects all
bullet tags.
<li>
Affects all
anchor tags.
<a>
Affects all
anchor tags. This style is applied after any
<a>
Applied to an
anchor tag when the mouse is hovering over the link. This style is
<a>
applied after any
and
a
Once the mouse moves off the link, the
Applied to an
anchor tag when the user clicks the link. This style is applied after
<a>
any
and
style.
a
a:link
Once the mouse button is released, the
or
<p>
<span>
tag.
<span>
style, if specified, takes precedence over the
p
style.
a:link
a:hover
a:active
Formatting text with Cascading Style Sheets
tag using either tag's
and
mainBody
emphasis
and
<p>
<span>
"Using HTML-
style.
a
style is removed from the link.
style is removed from the link.
class
.
tags,
<p>
body
143
Need help?
Do you have a question about the FLASH MX 2004 - ACTIONSCRIPT and is the answer not in the manual?
Questions and answers