Highlighted

Troubleshooting about mousemove in HTML5 Canvas

New Here ,
Jun 25, 2019

Copy link to clipboard

Copied

var frequency = 50;

stage.enableMouseOver(frequency);

this.cursore.addEventListener("mouseover", MoverC.bind(this));

function MoverC() {

this.cursore.scurisciCursore.visible = true

}

this.cursore.addEventListener("mouseout", MoutC.bind(this));

function MoutC() {

this.cursore.scurisciCursore.visible = false

}

this.cursore.addEventListener("mousemove", MmoveC.bind(this));

function MmoveC(event) {

alert(event)

}

Why this code don't work only with "mousemove"?

Views

94

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Troubleshooting about mousemove in HTML5 Canvas

New Here ,
Jun 25, 2019

Copy link to clipboard

Copied

var frequency = 50;

stage.enableMouseOver(frequency);

this.cursore.addEventListener("mouseover", MoverC.bind(this));

function MoverC() {

this.cursore.scurisciCursore.visible = true

}

this.cursore.addEventListener("mouseout", MoutC.bind(this));

function MoutC() {

this.cursore.scurisciCursore.visible = false

}

this.cursore.addEventListener("mousemove", MmoveC.bind(this));

function MmoveC(event) {

alert(event)

}

Why this code don't work only with "mousemove"?

Views

95

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jun 25, 2019 0
Adobe Community Professional ,
Jun 25, 2019

Copy link to clipboard

Copied

See if this helps?

/* Mouse Over Event

Mousing over the symbol instance executes a function in which you can add your own custom code.

Instructions:

1. Add your custom code on a new line after the line that says "// Start your custom code" below.

The code will execute when the symbol instance is moused over.

frequency is the number of the times event should be triggered.

*/

var frequency = 3;

stage.enableMouseOver(frequency);

this.movieClip_1.addEventListener("mouseover", fl_MouseOverHandler);

function fl_MouseOverHandler()

{

// Start your custom code

// This example code displays the words "Moused over" in the Output panel.

alert("Moused over");

// End your custom code

}

/* Mouse Out Event

Mousing out of the symbol instance executes a function in which you can add your own custom code.

Instructions:

1. Add your custom code on a new line after the line that says "// Start your custom code" below.

The code will execute when the symbol instance is moused out of.

*/

var frequency = 3;

stage.enableMouseOver(frequency);

this.movieClip_1.addEventListener("mouseout", fl_MouseOutHandler);

function fl_MouseOutHandler()

{

// Start your custom code

// This example code displays the words "Moused out" in the Output panel.

alert("Moused out");

// End your custom code

}

/* Custom Mouse Cursor

Replaces the default mouse cursor with the specified symbol instance.

*/

stage.canvas.style.cursor = "none";

this.movieClip_1.mouseEnabled = false;

this.addEventListener("tick", fl_CustomMouseCursor.bind(this));

function fl_CustomMouseCursor() {

this.movieClip_1.x = stage.mouseX;

this.movieClip_1.y = stage.mouseY;

}

//To restore the default mouse pointer, uncomment the following lines:

//this.removeEventListener("tick", fl_CustomMouseCursor.bind(this));

//stage.removeChild(movieClip_1);

//stage.canvas.style.cursor = "default";

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 25, 2019 1
Chicchi LATEST
New Here ,
Jun 27, 2019

Copy link to clipboard

Copied

The problem is:

I want to move a movieclip with my mouse when i click over this..

But i don't know how...

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jun 27, 2019 0