...just use global styles to set the font on the components to an embedded font in your swf. The components aren't anti-aliased because they use device fonts.

-josh

On Apr 5, 2007, at 9:36 AM, Randy Tinfow wrote:

I'm trying to make the text inside all macromedia components to be
Anti-aliased.  This has proven to be quite difficult.  I would rather
have a class that takes care of all of it, so here's what I have so far:

class net.imageplant.AntiAliaser
{
            private static var _arrChecked:Array;

            public static function antiAlias(mc:MovieClip,
bContinue:Boolean):Void
            {
                        if (!bContinue)
                        {
                                    _arrChecked = new Array();
                        }

                        for (var i:String in mc)
                        {
                                    if (mc[i] instanceof TextField &&
!checkChecked(mc[i]))
                                    {
_arrChecked.push(mc [i]);
                                                mc[i].antiAliasType =
"advanced";
                                    }
else if (mc[i] instanceof Object &&
!checkChecked(mc[i]))
                                    {
_arrChecked.push(mc [i]); antiAlias(mc[i], true);
                                    }
                        }
            }

            private static function checkChecked(mc:MovieClip):Boolean
            {
                        var nMcs:Number = _arrChecked.length;
                        var bChecked:Boolean = false;

                        for (var i:Number = 0; i < nMcs; i++)
                        {
                                    if (_arrChecked[i] == mc)
                                    {
                                                bChecked = true;
                                    }
                        }

                        return bChecked;
            }
}

I have only tested it on a List component so far, and it does not work.
I can't even figure out where the actual TextFields are in a List
component. How could MM overlook this? The components are useless when
you can't match the text to the rest of your app...any ideas/help?

TIA,

Randy Tinfow and Mike Randolph




_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to