hooked up layer to mouse events.