I have a simple function that dynamically creates text fields. My text field name is referenced by var thisTextField. Problem is, when i try to do things with my text field, actionscript shoots back an error as such:
**There is no property with the name ‘text’.
**How am i supposed to apply properties to my object if my objects name is a variable?
function showProducts() {
var products:Number = 0;
var thisTextField:String = "product" + products + "_txt";
for (var itemID in _global.rtsData[_global.rtsPos]["products"]) {
this.createTextField(thisTextField,1,25,75,350,50);
trace(thisTextField);
thisTextField.autoSize = true;
product+products+_txt.text = _global.rtsData[_global.rtsPos]["products"][itemID]["products_name"];
products++;
}
_root.products_mc.gotoAndPlay("fadeIn");
}