Javascript Canvas Custom Cursor Hover - CC Animation

Hi using Adobe Animate CC. I have a custom cursor and my cursor is hidden by default. The problem is that when I have a button symbol, the mouse pointer still appears on top of the custom cursor.

var display = this;

display.mc_play_button.addEventListener("click", play_game.bind(this));
function play_game()
{
	alert('Lets Play');
}

stage.cursor = 'none';
display.mc_cursor.mouseEnabled = false;
display.addEventListener("tick", custom_cursor.bind(this));

function custom_cursor() {
	display.mc_cursor.x = stage.mouseX;
	display.mc_cursor.y = stage.mouseY;
}
      

Run codeHide result


+3
javascript flash html5-canvas


source to share


No one has answered this question yet

Check out similar questions:

7649
How does JavaScript blocking work?
7494
How can I remove a specific element from an array in JavaScript?
7432
How to check if a string contains a substring in JavaScript?
7287
What does "use strict" do in JavaScript, and what are the reasons for it?
5722
How can I remove a property from a JavaScript object?
5670
Which operator is equal (== vs ===) should be used in JavaScript comparisons?
5101
What's the most efficient way to deeply clone an object in JavaScript?
4829
How do I include a JavaScript file in another JavaScript file?
4380
For each by an array in JavaScript?
3842
Create GUID / UUID in JavaScript?



All Articles
Loading...
X
Show
Funny
Dev
Pics