TextField instance inside a button Layer is null
Posted
by php html
on Stack Overflow
See other posts from Stack Overflow
or by php html
Published on 2010-03-25T16:40:50Z
Indexed on
2010/03/25
16:43 UTC
Read the original article
Hit count: 370
I've created an button object in flash. The button contains 2 layers. One is the background image and on top of it is a textField. The textfield is dynamic. I use the button inside a movieclip and I export it in a SWC. The I'm trying to use it in flex.
I'm trying to do this:
var myComponent:MyComponent = new MyComponent(); myComponent.button01.theTextField.text = "Caption";
I get and instance of the button, but the instance of the textField is null and I'm not able to change the text(but the default text appears onscreen). Does anyone has any idea what is wrong?
Here is the button timeline(Layer 2 contains the textfield, and the textfield instance is named theTextField):
© Stack Overflow or respective owner