Flash_Test
April 14th, 2007, 12:23 AM
Hi,
as you'll see with the following snippet of code, I'm rather new to OOP for Flash.
I've been trying to dynamically create a textField with no luck.
//mcPath:MovieClip is a parameter passed to the class' constructor
var myArray:Array = new Array("one", "two", "three");
for (var i=0; i>myArray.length; i++) {
var eval("myMc_" + i):MovieClip = mcPath.createTextField("tempText" + i, mcPath.getNextHighestDepth(), 9, 30, 552, 0);
}
The problem is that I get an error: (Syntax error)
Any help would be very much appreciated. Thanks
ps. I did look around, but couldn't find anything that could be of help to my problem. I'm sorry if this issue has already been dealt in the pass.
as you'll see with the following snippet of code, I'm rather new to OOP for Flash.
I've been trying to dynamically create a textField with no luck.
//mcPath:MovieClip is a parameter passed to the class' constructor
var myArray:Array = new Array("one", "two", "three");
for (var i=0; i>myArray.length; i++) {
var eval("myMc_" + i):MovieClip = mcPath.createTextField("tempText" + i, mcPath.getNextHighestDepth(), 9, 30, 552, 0);
}
The problem is that I get an error: (Syntax error)
Any help would be very much appreciated. Thanks
ps. I did look around, but couldn't find anything that could be of help to my problem. I'm sorry if this issue has already been dealt in the pass.