# Mouse Follow Question

**URL:** <https://forum.kirupa.com/t/mouse-follow-question/313183>\
**Category:** flash\
**Created:** [August 23, 2010, 10:19am UTC](https://forum.kirupa.com/t/mouse-follow-question/313183 "2010-08-23T10:19:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![superfamous](https://avatars.discourse-cdn.com/v4/letter/s/df705f/32.png) [@superfamous](https://forum.kirupa.com/u/superfamous)\
**Post date:** [August 23, 2010, 10:19am UTC](https://forum.kirupa.com/t/mouse-follow-question/313183/1 "2010-08-23T10:19:20Z")

</div>

I need a bit of help with a banner I’m making.

It’s a simple 600x150 eyes follow cursor type banner: [http://bit.ly/9krb1I](http://bit.ly/9krb1I)  
Using the code:

```auto
stage.addEventListener(MouseEvent.MOUSE_MOVE, followCursor);

function followCursor(event:MouseEvent):void {
	
	var coordy1 : Number = mouseY - eye1_mc.y;
	var coordx1 : Number = mouseX - eye1_mc.x;
	var angleRadians1 : Number = Math.atan2(coordy1,coordx1);
	var angleDegrees1 : Number = angleRadians1 * 180 / Math.PI;
	eye1_mc.rotation = angleDegrees1;
	
	var coordy2 : Number = mouseY - eye2_mc.y;
	var coordx2 : Number = mouseX - eye2_mc.x;
	var angleRadians2 : Number = Math.atan2(coordy2,coordx2);
	var angleDegrees2 : Number = angleRadians2 * 180 / Math.PI;
	eye2_mc.rotation = angleDegrees2;

}

```

My question is, is it possible to make the eyes follow the cursor outside the movie stage? So when it is placed on a site which could be 1100x900, the eyes would follow the cursor on the entire page…

Hope it make sense… Thanks
