# Problems with package

**URL:** <https://forum.kirupa.com/t/problems-with-package/270767>\
**Category:** Uncategorized\
**Created:** [September 13, 2008, 7:31pm UTC](https://forum.kirupa.com/t/problems-with-package/270767 "2008-09-13T19:31:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ElmGoodie](https://avatars.discourse-cdn.com/v4/letter/e/3e96dc/32.png) [@ElmGoodie](https://forum.kirupa.com/u/ElmGoodie)\
**Post date:** [September 13, 2008, 7:31pm UTC](https://forum.kirupa.com/t/problems-with-package/270767/1 "2008-09-13T19:31:43Z")

</div>

Hey!

So, Iattempted to create a package that is loaded into theEye.fla:

```php
package {
	
	import flash.display.MovieClip;

	public class theEye extends MovieClip {

		Mouse.hide();

	var maxMovement:Number = 20;
	var ovality:Number = 4;
	var origin = {x:eye.x, y:eye.y};
	var xdiff, ydiff, radius, angle : Number;

		public function theEye() {
			
			addEventListener(MouseEvent.MOUSE_MOVE, theEye);
			addEventListener(Event.ENTER_FRAME, frame);	
	
			function theEye(evt:MouseEvent):void {
			
				pointer.x = mouseX;
				pointer.y = mouseY;
			
				xdiff = mouseX - origin.x;
				ydiff = mouseY - origin.y;
			
				radius = Math.min(Math.max(Math.sqrt(xdiff * xdiff + ydiff * ydiff) / ovality, 0), maxMovement);
				angle = Math.atan2(ydiff,xdiff);
			
				eye.x = Math.cos(angle) * radius * ovality + origin.x;
				eye.y = Math.sin(angle) * radius * ovality + origin.y;
			}
			
			
			function frame(evt:Event):void {
				if(pointer.hitTestObject(center) && eye.currentFrame != eye.totalFrames) {
					eye.nextFrame();
					center.nextFrame();
				}
				else if(!pointer.hitTestObject(center) && eye.currentFrame != 1) {
					eye.prevFrame();
					center.prevFrame();
				}
			}
		}
	}
}

```

but when i try run it, I get the following errors:

Type was not found or was not a compile-time constant: MouseEvent  
Type was not found or was not a compile-time constant: Event
