# Im getting an error and i have no idea how to fix it :/

**URL:** <https://forum.kirupa.com/t/im-getting-an-error-and-i-have-no-idea-how-to-fix-it/278747>\
**Category:** flash\
**Created:** [January 5, 2009, 4:16am UTC](https://forum.kirupa.com/t/im-getting-an-error-and-i-have-no-idea-how-to-fix-it/278747 "2009-01-05T04:16:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![baggins825](https://avatars.discourse-cdn.com/v4/letter/b/c68b51/32.png) [@baggins825](https://forum.kirupa.com/u/baggins825)\
**Post date:** [January 5, 2009, 4:16am UTC](https://forum.kirupa.com/t/im-getting-an-error-and-i-have-no-idea-how-to-fix-it/278747/1 "2009-01-05T04:16:38Z")

</div>

Hi, im fairly new to As3 and have been slowly teaching myself As3. In the past I have been  
coding in the timeline, which i know, is a big no no, but today i’ve started learning how to write external classes and i figured id try and make one of my simple timeline scripts into a custom class. The class traces the X and Y location of the mouse, and it works fine when i only have it check the location once. Logically i needed to make it update when the mouse moves because its nearly worthless like it was, so i added an event listener to the function containing the trace, but for some reason now whenever i test it and i move the mouse i get this error " ArgumentError: Error #1063: Argument count mismatch on MouseTracker/xyupdate(). Expected 0, got 1."

```auto
package {
	
	import flash.events.MouseEvent;
	import flash.display.MovieClip;
	
	public class MouseTracker extends MovieClip {
		
		public function MouseTracker():void {
			stage.addEventListener(MouseEvent.MOUSE_MOVE, xyupdate);
		}

		public function xyupdate():void {
			trace("( " + mouseX + " , " + mouseY + " ) " );
		}
	}
}
			

```

any idea why this isn’t working? thx 😁
