Hi guys!
I need som help placing 16 instances of a component using a for function.
for (var i:int = 0; i < xmlList.length(); i++)
{
thumbLoader = new Loader();
thumbLoader.source = xmlList*.attribute("thumb");
thumbLoader.x = i * 140;
thumbLoader.y = 0;
thumbLoader.name = xmlList*.attribute("source");
addChild(thumbLoader);
thumbLoader.addEventListener(MouseEvent.CLICK, showThumb);
}
Thats the code that I´m using now, but I wonder if someone can help me to change the .y value after 4 instances has been placed on the .x axis, so I get four different lines with four on every line.
Any takers?
/rundevo