hmm, i've always found the text format stuff a bit odd (probably because
i never took the time to really figure out what is going on when)
try setting embedFonts to true straight after creating the text field,
and call setTextFormat after you put the text into the text field
although you would think that the defaultTextFormat call would be the
right way, but, tbh i didnt even know it existed :)
also make sure you have the latest swfmill, it didnt work when i used an
old version.
it also didnt work for me when i changed the order of some of the calls,
but i cant remember what..
if someone knows the inner magic of text formats and text fields id love
to know too.
good luck,
Martin
Nathanael Drouard wrote:
> Thanks for your help but... this is exactly what I do (I think), and...
> It doesn't work ! :(
>
> Here is my XML library :
> <?xml version="1.0" encoding="utf-8"?>
> <movie width="300" height="200" framerate="24">
> <background color="#ffffff" />
> <frame>
> <library>
> <font id="hoogeFont" import="ressources/HOOG0554.TTF"
> glyphs="abcdefghijklmnopqrstuvwxyzéèçàùâäêëîïôöûü0123456789" />
> </library>
> </frame>
>
> </movie>
>
> and here is my AS code :
>
> class MainClass {
> private function MainClass(){}
>
> public static function main() {
> _root.createTextField("test", 1, 20, 20, 100, 20);
> var tf:TextField = _root.test;
>
> var format:TextFormat = new TextFormat();
> format.font = "hoogeFont";
> format.size = 8;
> format.color = 0x000000;
> tf.defaultTextFormat(format);
> tf.embedFonts = true;
> tf.text = "Hello World !";
> }
> }
>
> And no text appears.
>
> Do you see something wrong in it ?
> Note : if I set embedFonts to false, the text appears, but with default
> font (Times).
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> osflash mailing list
> [email protected]
> http://osflash.org/mailman/listinfo/osflash_osflash.org
--
want to know what i think? probably not
http://relivethefuture.com/choronzon
_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org