I have this AS3 Class here which detects if a mouse has moved:
package
{
import flash.display.Sprite;
import flash.events.MouseEvent;
public class ApplicationTimer extends Sprite
{
public function ApplicationTimer()
{
stage.addEventListener(MouseEvent.MOUSE_MOVE,mouseMoved);
}
public function mouseMoved(event:MouseEvent):void
{
trace("mouse moved")
}
}
}
What I am trying to do is apply this class my main mxml Flex file so when my mouse moves in my project the mouseMoved method is called. How would I do this?