# MC property not found?

**URL:** <https://forum.kirupa.com/t/mc-property-not-found/292553>\
**Category:** flash\
**Created:** [July 15, 2009, 6:06pm UTC](https://forum.kirupa.com/t/mc-property-not-found/292553 "2009-07-15T18:06:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tpann](https://avatars.discourse-cdn.com/v4/letter/t/c67d28/32.png) [@tpann](https://forum.kirupa.com/u/tpann)\
**Post date:** [July 15, 2009, 6:06pm UTC](https://forum.kirupa.com/t/mc-property-not-found/292553/1 "2009-07-15T18:06:59Z")

</div>

I have a movie clip that has a property doSelect().

I add the movie clip thus:

```php
var obj:MovieClip = new Square();
addChild(obj);
obj.addEventListener(MouseEvent.CLICK, objClickListener);

function objClickListener(me:MouseEvent):void {
	me.target.doSelect();
}

```

This works as expected when I click the instance.

HOWEVER, when I add several instances of my movie clip thus:

```php
for (var i:int=1; i<10; i++) {
	var obj:MovieClip = new Square();
	addChild(obj);
	obj.x = Math.random()*(stage.stageWidth - obj.width);
	obj.y = Math.random()*(stage.stageHeight - obj.height);
	obj.addEventListener(MouseEvent.CLICK, objClickListener);
}

function objClickListener(me:MouseEvent):void {
	me.target.doSelect();
}

```

…clicking any one of the instances produces the following error:

[FONT=“Courier New”]ReferenceError: Error #1069: Property doSelect not found on flash.display.Sprite and there is no default value.  
at myFile\_fla::MainTimeline/objClickListener()[/FONT]

What am I doing wrong?
