I’m getting this error:
“TypeError: Error #1006: value is not a function.
at site_fla::MainTimeline/azulejo_click()[site_fla.MainTimeline::frame2:91]
Debug session terminated.”
I’ll try to explane what i’m trying to do, but my english sucks so…
I’ve 8 holders to put 8 images that I load from a XML file, my holders are: mcp_holder0, 1, 2,4… 7. To do this i’m using this code:
function azulejo_click(e:MouseEvent):void
{
trace("teste click1");
for (var u=0; u<=7;){
trace("id " + u);
var holderProdutos = "mcp_holder" + [u];
trace(holderProdutos);
loaderProdutos.unload(); loaderProdutos.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loadProduct_Progress); loaderProdutos.contentLoaderInfo.addEventListener(Event.COMPLETE, loadProduct_Complete);
trace("teste click2");
loaderProdutos.load(new URLRequest(dados2XML.azulejos[u].imagem));
trace(dados2XML.azulejos[u].imagem);
holderProdutos.addChild(loaderProdutos);
u++;
}
}
(line 91 = “holderProdutos.addChild(loaderProdutos);”)
The loop works fine and the trace show me the right path with the right file.
Thanks guys!