Create a "mask" layer above the main layer with the 'Force own texture' property enabled, the 'transparent' property disabled, and the background color set to black.
Put a sprite object on the mask layer, and set the blending mode to destination out. The opaque areas of this sprite will let you "see through" the mask layer to the layer below. You can set the position of this sprite to the mouse position every tick.