I had a recent issue with Dynamic Text Fields. In an interface I designed, I had a set of button symbols - just simple buttons. I didn't want to put any text labels in the buttons themselves, I wanted the text to come from an external XML file. So I set up the XML file and got the text into a Dynamic Text Field that I had in a layer above the buttons.
The problem happened when testing the movie. The buttons normal behavior was blocked by the Dynamic Text Field?!? For example, when hovering over the button, the cursor stopped being a hand cursor over the text field. Any rollover effects stopped when the cursor was over the text field. So I thought it was an issue with the text field itself, like some appearance property or something. I tried all of the settings and it didn't change anything.
After posting questions to a couple of forums, I finally got the answer. With ActionScript, you need to set the text fields mouseEnabled property to false:
textfield1.mouseEnabled = false;
That means that the text field doesn't respond to mouse events at all. Problem solved.
It seems odd to me that Dynamic Text Fields do this at all. I don't think this was a normal behavior in versions prior to CS4.
Labels: ActionScript, Dynamic Text, Flash CS4