It's a style sheet. CSS. So everything is strings or number, you can't use
references to flash objects.You can just use the font name directly. It'll
probably be marginally faster.

fontFamily = "Helvetica";

That's the font name not the name you gave the library item.

2009/1/14 Mendelsohn, Michael <[email protected]>

> Thanks everyone.  I got multiple fonts working wonderfully.  I'll never
> look back.
>
> One quirky AS3 thing though:  why do I have to refer to the font this
> way:
>
> private function styler():StyleSheet{
>        var ss:StyleSheet = new StyleSheet();
>        var uplain:Object = new Object();
>        uplain.fontFamily =  new Univers().fontName;
>        uplain.fontSize = "30";
>        uplain.color = "#FFFFFF";
>        uplain.marginLeft = uplain.marginRight = "10";
>        uplain.textAlign = "left";
>        ss.setStyle(".uplain", uplain);
>        return ss;
> }
>
>
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



-- 
The Random Lines
My online portfolio
www.therandomlines.com
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to