hi list
quickly, it's my first post here, I'm a Flash developper and am
interrested in switching to some kind of FAME dev platform (further
introduction and my difficulties in just doing it, making the whole
stuff simply work, will probably be the topic of some next post...).
thus I can currently only talk about AS2 and Flash problems from my
pure Macromedia Flash IDE experience
I agree the text issues are often a mess with Flash.
anyway, there's another method than "setTextFormat" which is
"setNewTextFormat", and maybe it could help...
and i've experienced too that changing the order is sometimes useful
(generally : putting the textformat stuff after setting the .text or
htmlText property).
yet, even after doing quite a lot of stuff with textfields, there are
two solutions:
- I don't understand the way it works so far
- the way it works is really a mess
as an egocentric geek, I'd choose the second solution...
+++
clemos
On 11/25/05, Martin Wood <[EMAIL PROTECTED]> wrote:
> 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
>
_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org