I am fairly new to AS3 but here is my code
function attach(p:XML) {
var plist:XMLList = p.project;
numOfItems = plist.length();
//trace(numOfItems);
for (var i = 0; i < numOfItems; i++)
{
var t = new item();
t.name = "item_"+i;
t.addEventListener(Event.ENTER_FRAME, render);
t.tooltext = plist.name*.text();
var pictLdr:Loader = new Loader();
pictLdr.load(new URLRequest(plist.thumb*.text()))
t.icon.inner.addChild(pictLdr);
t.r.inner.addChild(pictLdr);
addChild(t);
}
}
The issue is with the loader… what would be the most efficient way of doing this… i have a feeling there is more efficient way of doing the loader…
issue #2 - using this method the picLdr will only addChild to the last one t.r.inner… and not the first one… if i remove the t.r.inner it will load it to the icon one. i need to load it to both.