# TypeError: Error #1006: value is not a function

**URL:** <https://forum.kirupa.com/t/typeerror-error-1006-value-is-not-a-function/273902>\
**Category:** flash\
**Created:** [October 22, 2008, 9:52am UTC](https://forum.kirupa.com/t/typeerror-error-1006-value-is-not-a-function/273902 "2008-10-22T09:52:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![muflyn](https://avatars.discourse-cdn.com/v4/letter/m/f6c823/32.png) [@muflyn](https://forum.kirupa.com/u/muflyn)\
**Post date:** [October 22, 2008, 9:52am UTC](https://forum.kirupa.com/t/typeerror-error-1006-value-is-not-a-function/273902/1 "2008-10-22T09:52:32Z")

</div>

Hi,

I’ve searched in google and read many posts, but still couldn’t understand my error message. I changed the name of the function and other solutions in posts, but nothing works. Can anyone tell me what’s my function problem? and the wierdest thing is that the trace of my var i = 0

```auto

function Click(event:MouseEvent):void {
	for (var i:int=0; i<5; i++) {
		trace("iii " + i);
		if (event.currentTarget!=lista*) {
			lista*.gotoAndStop("down");
			lista*.buttonMode = false;
			lista*.mouseEnabled = false;
			lista*.removeEventListener(MouseEvent.ROLL_OVER,Over);
			lista*.removeEventListener(MouseEvent.ROLL_OUT,Out);
			lista*.removeEventListener(MouseEvent.CLICK,Click);
		} else {
			if (lista*.currentLabel =="down") {
				trace ("current label " + lista*.currentLabel)
				lista*.gotoAndStop("out");
			}
			lista*.buttonMode = true;
			lista*.mouseEnabled = true;
			lista*.addEventListener(MouseEvent.ROLL_OVER,Over);
			lista*.addEventListener(MouseEvent.ROLL_OUT,Out);
			lista*.addEventListener(MouseEvent.CLICK,Click);
		}
	}
}

```
