Hi,
Okay i know this sounds like a real stupid problem, but i have been trying to figure it out for quite a while and is unable to…
I have a TextField Object added as a child in one of my Classes (which extends MovieClip). After adding it to the class, I am unable to modify the text value of it…
can any one help me out here?
var myClass:MyClass = new MyClass();
var fmt:TextFormat = new TextFormat();
var tf:TextField = new TextField();
fmt.font = "EmbedFont";
fmt.size = 8;
fmt.color = 0x333333;
tf.embedFont = true;
tf.text = "Lorem";
tf.antiAliasType = AntiAliasType.NORMAL;
tf.type = TextFieldType.DYNAMIC;
tf.autoSize = TextFieldAutoSize.LEFT;
tf.name = "myTxt";
tf.setTextFormat(fmt);
myClass.addChild(tf);
addChild(myClass);
// Somewhere else in the script i havhe this line.. but it just does not WORK!!!! WHY!!!
myClass.getChildByName("myTxt").text = "Ipsum";