# Error #1006: value is not a function

**URL:** https://forum.kirupa.com/t/error-1006-value-is-not-a-function/317011
**Category:** Uncategorized
**Created:** [December 7, 2010, 10:50pm UTC](https://forum.kirupa.com/t/error-1006-value-is-not-a-function/317011 "2010-12-07T22:50:17Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![raphadont](https://avatars.discourse-cdn.com/v4/letter/r/c37758/32.png) [@raphadont](https://forum.kirupa.com/u/raphadont)
#### Post date: [December 7, 2010, 10:50pm UTC](https://forum.kirupa.com/t/error-1006-value-is-not-a-function/317011/1 "2010-12-07T22:50:17Z")

</div>

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:

```php

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!
