|
|
So the problem of how to set alpha on a dynamic text field is one of those things that apparently requires a bit of Flash voodoo. I searched around the web and almost all I found was "oh, you MUST embed the font and then it will work and that's the only way it will work" or .... "it's not possible". After some digging around I found that It is possible, and you don't have to embed the fonts. You can use system fonts and still set _alpha on a Text Field. Now, what I've got is a workaround. It's not the "right" way to do this. But if you've worked with Flash for very long then you're used to stepping off the path and using a trick or two to accomplish what shouldn't be possible, right? The simple solution is if you put the Text Field into a movieclip and apply a filter to it then the Flash Player caches a bitmap of the movieclip (text field included) and then you can change the alpha. You can also rotate but it's not pretty if it's not a right angle rotation since it's a bitmap you're swinging around. |
|---|
Here's what happens when you apply a filter to a MovieClip containing a dynamic text field (with system fonts) and then set the alpha on the mc. The alpha is applied to the text field as well.
The really weird thing that I haven't figured out is why I can't just use cacheAsBitmap=true for this? It only works if I apply a full fledged filter. Here's what happens when I just use cacheAsBitmap on either a TextField within a mc or on a Text Field:
I've also tried what you see below and it leaves the text behind (making essentially white text where it should be black).
And as always, I'm posing this as a question rather than as the authority on this.. I'm just putting together little pieces I've found scattered around the web and hoping someone will shine the light on a better way.
Inspiration came from a ton of places where I saw folks saying this isn't possible, a post that I keep returning to on PolyGeek, and the feeling that there has to be a better way than applying a filter. There just has to be... ?