Custom Cursor


i used code snippets add own custom curser game.

 

the code snipped has mouse.hide(); code in hide normal cursor, when leave in given code snippets error message:

 

scene 1, layer 'actions', frame 1, line 14 1120:access of undefined property mouse.

 

if comment mouse.hide(); line out, new cursor works fine on top of else should normal cursor still there.

 

should somehow define mouse property in addition code?

 

here code relevant problem.

 

/* custom mouse cursor

replaces default mouse cursor specified symbol instance.

this part works fine

*/

 

stage.addchild(mycursor);

mycursor.mouseenabled = false;

mycursor.addeventlistener(event.enter_frame, fl_custommousecursor);

 

function fl_custommousecursor(event:event)

{

    mycursor.x = stage.mousex;

    mycursor.y = stage.mousey;

}

 

//and here code causing me problems

 

mouse.hide();

 

screenshot.png

add:

 

import flash.ui.mouse;



More discussions in Adobe Animate CC - General


adobe

Comments

Popular posts from this blog

How to set the order of FAQs instead of alphabetical

Thread: Get UK Keyboard working

how do I change the e-mail address for my merchant account