This content has been marked as final. Show 6 replies
This is a temp fix but I still would prefer an AS based way of doing it....
I put a text field off the stage of my shell and embedded the font i needed into my swf that way but I'd like to know how it works just from AS3....
add a font to your library per usual. assign it a class name, say _arialBold. you can then use:
wow. as usual, thanks k. sometimes I really wish that the people writing these cookbooks were doing so with a final release and not a candidate release of the language. I'm assuming that [Embed] is the metatag used by Flex.... anyways, I now have it working from your code. much appreciated.
i've never been able to get font embedding to work with the metatag stuff. i assume it works for flex because i see it all over when discussing embedding fonts for as3.
Can you provide a working AS and Fla? If not, do you mind posting your code? I'm having similar problems and have been searching for a solution for days now. I tried copying the code above and applying KGlad's suggestion, but it still doesn't work.
I went to the library panel and added a new Font. In the name field I added "_arialBold". Then I hit OK. I then right clicked and selected linkage. I checked off "Export for AS"and "Export in first frame". In the class field I put "_arialBold". The base class was "flash.text.Font". In the class you created, I replaced every instance of the word "Vivacious" with "_arialBold". I added KGlads code one line after you defined the TextFormat.
In my fla, I imported your class and then created a new instance of your class. I ran the file... blank screen...
The updated code that is working.....