Hi,
I’m getting the last 5 rows from a database with AMFPHP engine. The results are parsed into an array of an array (rows and their column values)
I am using a for statement to deliver all the results from the Array. For each loop I want to create an instance of a movieClip from my Lybrary “Title”. But I can’t assign the “i” as an instance variable name.
The code looks like that:
// parse the ArrayCollection
var t:Array = responds.serverInfo.initialData;
for(var i:uint=0; i<t.length; i++)
{
//crate new instance of title and name it the "id" value
var t*[0]:Title = new Title;
addChild(title*[0]);
t*[0].x = 25;
t*[0].y += 35;
//Set the "title" column value as text
t*[0].dynamicText.text = t*[1];
t*[0].buttonMode = true;
t*[0].addEventListener(MouseEvent.CLICK, showDetail);
}
I am getting the error: 1086: Syntax error: expecting semicolon before leftbracket.
I tried “var i:Title”, dosen’t function as well, the error was:
1151: A conflict exists with definition i in namespace internal.
I should somehow numerate those movie clips and add to the stage.
Thanks in advance