Hi,
This is something related to applying the CSS bases stylesheet to the textfield.
Let’s say i have a css:
[AS]
.headerSize
{
font-size:20pt;
}
.msgSize
{
font-size:10pt;
}
.first
{
font-family:Trebuchet MS;
}
[/AS]
If I were to use this in html and apply the stylesheet of header text
it would be something like this
[AS]
<p class=“first headerSize”>This is header Text</p>
[/AS]
If I do the same thing in action script it fails to apply the stylesheet.
[AS]
myStyle_obj=new TextField.StyleSheet();
myStyle_obj.onLoad=function(succ)
{
if(succ)
{
_root.header_txt.styleSheet=this;
_root.header_txt.html=true;
_root.header_txt.htmlText="<p class=‘first headerSize’>Header Text</p>"
}
}
myStyle_obj.load(“mycss.css”);
[/AS]
Is there any other way to achieve this thing?