So I'm working on a game with some intense graphics, and it seems like the mouse input starts lagging way before the framerate starts dropping. I have a custom cursor that is supposed to follow the mouse, but when I really whip it around and there's a lot of movieclips moving around on the stage, it lags behind a frame or two.
Here's the code:
addEventListener(MouseEvent.MOUSE_MOVE,CursorFunction);
...
private function CursorFunction(event:MouseEvent):void {
// Mouse
Mouse.hide()
Cursor.x = mouseX;
Cursor.y = mouseY;
event.updateAfterEvent();
}
I noticed this when I was making Ether Cannon too. It's weird because the framerate is nice and constant (and everything is moving around smoothly). The custom cursor is the only thing that lags.
Any ideas? Maybe I should email Adobe and yell at them.