Highlighted

Mouse not centered

Explorer ,
Jul 27, 2020

Copy link to clipboard

Copied

Hello,

Below is my code to move a clip called myCLip
this.monClip.addEventListener ("pressmove", fct.bind (this));
function fct (evt) {
var p = this.globalToLocal (evt.stageX, evt.stageY);
this.monClip.x = p.x;
this.monClip.y = p.y;
}

How can I prevent the mouse cursor from being positioned at the center of the myClip object?
Thank you for your reply.
TOPICS
Code

Views

46

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

Mouse not centered

Explorer ,
Jul 27, 2020

Copy link to clipboard

Copied

Hello,

Below is my code to move a clip called myCLip
this.monClip.addEventListener ("pressmove", fct.bind (this));
function fct (evt) {
var p = this.globalToLocal (evt.stageX, evt.stageY);
this.monClip.x = p.x;
this.monClip.y = p.y;
}

How can I prevent the mouse cursor from being positioned at the center of the myClip object?
Thank you for your reply.
TOPICS
Code

Views

47

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
Jul 27, 2020 0
kglad LATEST
Adobe Community Professional ,
Jul 28, 2020

Copy link to clipboard

Copied

if you're asking how to set your cursor to none, use:

 

canvas.style.cursor = "none";

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...
Jul 28, 2020 0