Alpha blending CSS TextFields in ActionScript 3

March 31st, 2009

The problem I encountered with CSS driven TextFields in AS3 was that I was no longer able to use “embedfonts = true” to be able to set the TextField alpha. To solve this issue you can use blendModes on the TextField object, as in the following:

myTxtField.blendMode = BlendMode.LAYER;
myTxtField.alpha = 0,5;

This also works with a mask over a textfield.

Example

Source file

Do realise that using blendmodes you increase the clients CPU load.


Trackback URI | Comments RSS

Leave a Reply

Name (required)

Email (required)

Website

Speak your mind