Trying to write a script that load dynamic text from a .txt file.
Everything works fine until i tried to put the dynamic text inside a movieclip. There is a error generated which i dont understand.
Really appreciated if someone can advice me on my mistake. Thanks.
Below is my code,
var myLoader:URLLoader = new URLLoader();
myLoader.dataFormat=URLLoaderDataFormat.VARIABLES;
myLoader.load(new URLRequest(“data.txt”));
myLoader.addEventListener(Event.COMPLETE, loadData);
function loadData(e:Event){
for (var i:uint=0; i<myLoader.data.cant; i++) {
this[“menuButton”+i+"_mc"].buttonName_txt.text=myLoader.data[“Coments”+i];
}
}
Below is the error generated,
A term is undefined and has no properties.