How to create new textfields?

Hello,

Im trying to create loop which will creat 4 new textfields and will put text into each field. The variables are already definned. But i doens’t seem to work. Could someone please help me?


detail2 = "test2";
detail3 = "test3";
detail4 = "test4";
detail5 = "test5";

for (var i=1; i<=5; i++) {
	this.createTextField("mytext"+i,2,-218,-47,200,16);	
	this.["mytext"+i].multiline = true;
	this.["mytext"+i].wordWrap = true;
	this.["mytext"+i].border = false;
	myformat = new TextFormat();
	myformat.font = "Verdana"
	myformat.color = 0xFFFFFF;
	myformat.bullet = false;
	myformat.size = 10;
	myformat.align = "right";
	this.["mytext"+i].text = detail+i;
	this.["mytext"+i].setTextFormat(myformat);
}