I'm loading images using XML. Right now, the situation is that the image is only loaded onto the last entry in the XML. cv is a popup that contains a holder called cHolder and a text field called ct. The images will be loaded onto cHolder. How do is solve this so that image will loaded onto all cHolder?
for each (var projectName:XML in projectAttributes)
{
//trace(projectName);
var projectDP:XMLList = projectInput.project.(@name == projectName).displayP;
trace(projectDP);
var cv:MovieClip = new cView();
catNo += 1;
if(catNo % 5 == 0)
{
catY += 137;
catX = -170;
cv.x = catX;
cv.y = catY;
}
else
{
cv.x = catX;
cv.y = catY;
catX += 112;
}
imageLoader.load(new URLRequest(projectDP));
cv.cHolder.addChild(imageLoader);
cv.ct.text = projectName;
cv.buttonMode = true;
this.addChild(cv);
}