Re: [Flashcoders] multiple fonts in TextField?

2009-01-13 Thread allandt bik-elliott (thefieldcomic.com)
agreed - at this point you should be looking at stylesheets and span tags to do your styling, especially if you're doing multiple text styles in a single field - it makes it much easier to change later if the client starts going mad On Mon, Jan 12, 2009 at 10:24 PM, Ashim D'Silva

RE: [Flashcoders] multiple fonts in TextField?

2009-01-13 Thread Mendelsohn, Michael
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();

Re: [Flashcoders] multiple fonts in TextField?

2009-01-13 Thread Ashim D'Silva
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

Re: [Flashcoders] multiple fonts in TextField?

2009-01-13 Thread Romuald Quantin
I dont know if you think it is useful but I've extracted a text tool from my framework: SomaText. It allows you to easily create TextField and apply styles from a stylesheet, you can set a lot TextField and TextFormat properties straight from the stylesheet if you wish. It is a single class

Re: [Flashcoders] multiple fonts in TextField?

2009-01-12 Thread Rob Romanek
Hi Michael, If your second font is not embedded in any text field but only available via linkage then while it is embedded in your file it is not available for usage. To make it available you need to use the registerFont function with your linked font. After that it should show up in any

RE: [Flashcoders] multiple fonts in TextField?

2009-01-12 Thread Mendelsohn, Michael
Thanks for replying Rob. I did this in the document class, but nothing happened. Import flash.text.Font; In the constructor: Font.registerFont(XYZBold); Then I tried: Font.registerFont(new XYZBold().fontName); But that didn't work either. Where do you make it available? - MM If your second

Re: [Flashcoders] multiple fonts in TextField?

2009-01-12 Thread Ashim D'Silva
It depends on the compiler, but in the Flash IDE go into your library, and click New Font, then embed the font you want. Bold and Italic have to be embedded separately if required. Remember to turn on Export for Actionscript as well. You also might want to look into style sheets. It keeps things