I'm confused about how you're actually assigning the text at all. I'm assuming that btnLabelMain is a dynamic textfield with an instanceName of "btnLabelMain".
So to assign text to that label you should correctly be calling:
btnLabelMain.text = "my label text";
Is it possible this might be the error, and that the type coercion error is becuase you're trying to assing something of type "string" to something of type textField.
T
Main Topics
Browse All Topics





by: ugebPosted on 2008-06-08 at 17:33:36ID: 21740152
Hi,
At least one error is that it looks like you're mixing data types and you may have a misplaced child object, which can be subtle problems. Is myButton a child of mySym1? Just placing myButton on the stage on top of mySym1 does not make it a child, and the mySym1.myButton syntax requires that it be a child. You can force it to be a child in AS3 by setting
mySym1.addChild(myButton);
Just to verify, call:
trace("number of children of mySym1 = "+ mySym1.numChildren);
Do you have code you can show? If not, maybe take a screen shot of your setup.