Archive for the ‘TextField’ Category
Rotate dynamic system fonts with Flash Player 9
Using Flash player 10 lets us use the rotationZ paramter of a TextField. But of course some clients require us actionscript developers to support the older player version as well.
An easy way to get around this problem is to draw the TextField into a Bitmap. I use my own TextUtils class with a static method like this:
public static function convertTextFieldToBitmap(textField : TextField) : Bitmap
{
var bitmapData : BitmapData = new BitmapData(textField.width, textField.height, true, 0×00000000);
bitmapData.draw(textField);
var bitmap : Bitmap = new Bitmap(bitmapData);
bitmap.smoothing = true;
return bitmap;
}
So rotating and fading the TextField is no problem anymore, also the scaling works much smoother:
