Anti-aliasing a text field

#1
Hello everybody!
Here is my trouble: I create a text field with AS3 code. BUT: the characters are disgusting, and the same text (with the same font, but created on stage with a mouse and keyboard) placed near looks perfect. Obviously the second text have been modified with anti-aliasing. At user interface of Flash Professional there are a few variations:
1) System fonts
2) no anti-aliasing
3) anti-aliasing for animation
4) anti-aliasing for reading
5) custom anti-aliasing
Does anybody know how these settings (modes) can be implemented in AS3 code?
Thank you!

Re: Anti-aliasing a text field

#2
There should be plenty of help to this topic in the internet. Be aware, that you also need to embedd the font that you add to the textfield.

The easier way of doing this would be to create a MovieClip in the library an put a Texfield into it. You can set all font related properties in the designer, as you do, when it's placed on the stage. Then from code do something like:

Code: Select all

var p:MovieClip = new nameOfMovieclip;
p.textfieldName.text = "This is a Text";
...
So you have the best of both worlds.
Didi Kunz
CasparCG Client-Programmer, Template Maker & Live CG-Operator
Media Support, CH-5722 Gränichen, Switzerland http://mediasupport.ch/
Problems? Guide to posting Bug reports & Feature requests

Re: Anti-aliasing a text field

#4
I did understand, what you wanted to do, I did not understand, why it makes sense to create the TextField from code, when you could just load one from the library. You can load as many copies of a given MovieClip into your stage, as you want. There is no limit, and you would not need to fumble around with all these settings in code, just set them in the designer. So why not do it the easy way?
Didi Kunz
CasparCG Client-Programmer, Template Maker & Live CG-Operator
Media Support, CH-5722 Gränichen, Switzerland http://mediasupport.ch/
Problems? Guide to posting Bug reports & Feature requests