Quick tip: Alpha On TextFields

When targeting your movie into flash player 9 (or lower), you can fall into issues with text transparency. If TextField contains not embedded font, by default it will not render transparency (alpha) correctly. Luckily, there is a solution for that, as simple as setting blendMode to “layer” parameter to your TextField. This solution was mentioned on Glenn Gervais blog plus there are some other techniques mentioned in comments, for example applying BlurFilter(0, 0) or cacheAsBitmap=true. Thankfully, once you start targeting Flash Player 10, you won’t need any sort of hacks.

var myTextField:TextField() = new TextField();
myTextField.blendMode = BlendMode.LAYER;
myTextField.alpha = 0.5;

Leave a comment

Please be polite and on topic. Your e-mail will never be published.