hide(); isn't a function
I'm creating a custom mouse cursor for my file. For that, I imported a PNG, converted it to Movie Clip, added an instance name and used the default code snippet to create the cursor. However, when exporting, Animate is giving me as error: hide(); is not a function.
/* Custom Mouse Cursor
Replaces the default mouse cursor with the specified symbol instance.
*/
stage.addChild(cursor);
cursor.mouseEnabled = false;
cursor.addEventListener(Event.ENTER_FRAME, fl_CustomMouseCursor);
function fl_CustomMouseCursor(event:Event)
{
cursor.x = stage.mouseX;
cursor.y = stage.mouseY;
}
Mouse.hide();
//To restore the default mouse pointer, uncomment the following lines:
//cursor.removeEventListener(Event.ENTER_FRAME, fl_CustomMouseCursor);
//stage.removeChild(cursor);
//Mouse.show();
That's the complete code that Animate code snippet contains (cursor is the instance name of the required movie clip). I haven't edited anything from it.
The exact error:
TypeError: Error #1006: hide is not a function.
at Untitled_1_fla::MainTimeline/frame1()
(Untitled-1 is the file name).
I guess, this has to do something with the default mouse cursor not hiding. Basically, a user sees both, the default as well as custom cursor.
Also, my cursor is turning into a white square at some parts.
For example, this is my custom cursor:

Here it turns to white square for no obvious reason:

Here's my file (FLA and SWF): https://drive.google.com/drive/u/0/folders/1jfyvRCX22TW0DMyOBrmWaCFq3d-wfnWA
