August 09, 2010Recently I ran into some trouble with a TextField in a Flash/AS3 project. Since the font couldn't be embeded (due to size) the TextField was changed to _sans / "Use device fonts" (_sans and _serif are generic fonts that will use the best match from the clients computer). This introduced a problem, the alpha fades that previously worked with the embeded font suddenly stopped. Setting the alpha value didn't affect the TextField at all.
The solution to this problem is to set a blend mode on the TextField as for some reason alpha values and device fonts doesn't play well together in the default BlendMode.Normal setting.
Set the blend mode:
myTextField.blendMode = BlendMode.LAYER;
And don't forget the: