# I got a problem in addEventListener

**URL:** <https://forum.kirupa.com/t/i-got-a-problem-in-addeventlistener/237072>\
**Category:** Uncategorized\
**Created:** [August 27, 2007, 2:46am UTC](https://forum.kirupa.com/t/i-got-a-problem-in-addeventlistener/237072 "2007-08-27T02:46:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kittrash](https://avatars.discourse-cdn.com/v4/letter/k/eb9ed0/32.png) [@kittrash](https://forum.kirupa.com/u/kittrash)\
**Post date:** [August 27, 2007, 2:46am UTC](https://forum.kirupa.com/t/i-got-a-problem-in-addeventlistener/237072/1 "2007-08-27T02:46:37Z")

</div>

here is my code, i draw two ciricle on the stage. Each circle can controlled by another circle on the stage. That’s mean if i click circle1, then some action will be taken on circle 2. but the following code doesnt work, how can i control any other object using addEventListener ??

package {  
import flash.display.Sprite;  
import flash.events.MouseEvent;

public class testing extends Sprtie {  
public function testing() {

var cir1:Sprite = new Sprite();  
cir1.graphics.beginFill(0x000000);  
cir1.graphics.drawCircle(0,0,100);  
cir1.graphics.endFill();  
addChild(cir1);  
var cir2:Sprite = new Sprite();  
cir2.graphics.beginFill(0x000000);  
cir2.graphics.drawCircle(200,200,100);  
cir2.graphics.endFill();  
addChild(cir2);

```
    cir1.addEventListener(MouseEvent.MOUSE_DOWN, dnHandler);

```

}  
private function dnHandler(event:MouseEvent):void {  
cir2.x = 500;  
}  
}  
}
