Min,
Do something like:
function setStyleSheet(event)
{
var myStyleSheet = new TextField.StyleSheet();
myStyleSheet.load("assets/styles.css");
event.target.styleSheet = myStyleSheet;
}
<mx:Text width="100%" initialize="setStyleSheet(event)">
<mx:htmlText>
<![CDATA[
<span class='bodyText'>test</span>
]]>
</mx:htmlText>
</mx:Text>
Hope that helps.
-James
On Wed, 2005-03-16 at 19:37 +0000, Min Lieu wrote:
>
> Hello,
>
> I've embedded the Futura font family in my Flex application. Can the
> text within the htmlText property of a mx:Text tag access these fonts?
>
> For example, I have the following stylesheet "mystyle.css":
>
> @font-face {
> src: url("/fonts/lte50154.ttf");
> fontFamily:futura;
> }
>
> bodyText {
> font-family: "futura";
> font-size: 12pt;
> text-align: left;
> color: #000000;
> }
>
> And I have the following line within my mxml file:
>
> <mx:Text htmlText="<span class='bodyText'>HELLO!</span>" />
>
> Thanks!
>
> Min
>
>
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>