i think there are a number of different ways to embed fonts in flash. but the
way i do it is by creating a "new font" from the library panel and then setting
the linkage so it is "export for actionscript" and then giving it a class name.
this definitely works for me and works with your code (without the tweenLite
stuff). only a couple other modifications to the code. you can see the code at:
http://pastebin.com/m401946d0
all this stuff is on the adobe docs i think, written somewhere.
hope that sorts it.
> Date: Fri, 20 Nov 2009 10:45:22 -0800
> Subject: Re: [Flashcoders] Creating And Printing String With AS3
> From: [email protected]
> To: [email protected]
>
> it looks like you're not calling the init() method so the code is set
> up correctly but none of it is ever called.
>
> when you have a problem like that, it's good to break it down into
> little pieces; instead of debugging three methods, comment two out and
> focus on just one. if that doesn't work, take out vars, math etc and
> keep breaking it down until you find the problem, then add back on.
>
> working in this manner is a great way to develop, and doing so will
> cut down your frustration considerably.
>
>
>
>
>
>
>
>
> On Fri, Nov 20, 2009 at 10:24 AM, beno - <[email protected]> wrote:
> > On Fri, Nov 20, 2009 at 12:45 PM, Glen Pike
> > <[email protected]>wrote:
> >
> >> Hi,
> >>
> >> This might help:
> >>
> >>
> >> http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/js/html/wwhelp.htm?href=00000234.html
> >>
> >
> > That doc states:
> >
> > Create a TextFormat object, set its fontFamily property to the name of the
> > embedded font, and apply the TextFormat object to the TextField. When
> > specifying an embedded font, the fontFamily property should only contain a
> > single name; it cannot use a comma-delimited list of multiple font names.
> >
> > So I changed my code as follows:
> >
> > public function blurClient():void
> > {
> > trace('blurClient');
> > var client:TextField = new TextField();
> > this.addChild(client);
> > var clientString:String = 'Joel Holt';
> > client.text = clientString;
> > client.embedFonts = true;
> > client.x = 100;
> > client.y = 100;
> > client.height = 20;
> > client.width = 200;
> > var clientFormat:TextFormat = new TextFormat();
> > clientFont:fontFamily = 'Arial';
> > clientFormat.color = 0xffffff;
> > clientFormat.size = 20;
> > clientFormat.font = 'Arial';
> > client.defaultTextFormat = clientFormat;
> > TweenMax.to(client, 1, {blurFilter:{blurX:20}}).reverse();
> > }
> >
> > and got the complaint that there is no such thing as "fontFamily". What
> > should I use instead?
> >
> >>
> >> Simply:
> >>
> >> Put a TextField off the stage somewhere. Put some random text in it, set
> >> it to "Dynamic Text", set the font face to Arial (size doesn't matter)
> >> Choose "Embed" and select your character ranges - (Basic Latin is
> >> useful). If you animate text, change the Aliasing to "...Animation".
> >>
> >> When you create a text field, set embedFonts to true:
> >
> >
> >> e.g.
> >> atty.embedFonts = true;
> >>
> >
> > I did all of this.
> >
> > David Hunter asked about the bgcolor. It's black
> > Jared Stanley suggested another list and it's archives. I will plumb them.
> > Thank you all and I await further input.
> > beno
> > _______________________________________________
> > Flashcoders mailing list
> > [email protected]
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
>
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_________________________________________________________________
Got more than one Hotmail account? Save time by linking them together
http://clk.atdmt.com/UKM/go/186394591/direct/01/_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders