0
Explorer
,
/t5/animate-discussions/mouse-pointer/td-p/12085348
Jun 02, 2021
Jun 02, 2021
Copy link to clipboard
Copied
how can i change the mouse pointer to movie clip or to object from the labrary?
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
1 Correct answer
Community Expert
,
Jun 02, 2021
Jun 02, 2021
Here is a suggestion:
stage.mouseMoveHandler = function()
{
stage.customCursor.x = stage.mouseX / stage.scaleX;
stage.customCursor.y = stage.mouseY / stage.scaleY;
};
stage.canvas.style.cursor = "none";
stage.mouseMoveOutside = true;
stage.customCursor = new lib.YourLibSymbol(); // YourLibSymbol is the symbol's linkage name in the Library
stage.customCursor.mouseEnabled = false;
stage.addChild(stage.customCursor);
stage.on("stagemousemove", stage.mouseMoveHandler);
stage.mouseMoveHandler(
...
Community Expert
,
/t5/animate-discussions/mouse-pointer/m-p/12085384#M344504
Jun 02, 2021
Jun 02, 2021
Copy link to clipboard
Copied
Hi.
HTML5 or AS3?
Regards,
JC
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Yigal0D4B
AUTHOR
Explorer
,
/t5/animate-discussions/mouse-pointer/m-p/12085387#M344506
Jun 02, 2021
Jun 02, 2021
Copy link to clipboard
Copied
html5
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Community Expert
,
/t5/animate-discussions/mouse-pointer/m-p/12085457#M344507
Jun 02, 2021
Jun 02, 2021
Copy link to clipboard
Copied
Here is a suggestion:
stage.mouseMoveHandler = function()
{
stage.customCursor.x = stage.mouseX / stage.scaleX;
stage.customCursor.y = stage.mouseY / stage.scaleY;
};
stage.canvas.style.cursor = "none";
stage.mouseMoveOutside = true;
stage.customCursor = new lib.YourLibSymbol(); // YourLibSymbol is the symbol's linkage name in the Library
stage.customCursor.mouseEnabled = false;
stage.addChild(stage.customCursor);
stage.on("stagemousemove", stage.mouseMoveHandler);
stage.mouseMoveHandler();
Regards,
JC
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Yigal0D4B
AUTHOR
Explorer
,
/t5/animate-discussions/mouse-pointer/m-p/12087810#M344541
Jun 03, 2021
Jun 03, 2021
Copy link to clipboard
Copied
thank you
how i can back to the regular mouse?
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Community Expert
,
LATEST
/t5/animate-discussions/mouse-pointer/m-p/12088508#M344549
Jun 03, 2021
Jun 03, 2021
Copy link to clipboard
Copied
Hi again.
Please try this:
stage.enableCustomCursor = function()
{
stage.canvas.style.cursor = "none";
stage.customCursor = new lib.YourLibSymbol();
stage.customCursor.mouseEnabled = false;
stage.addChild(stage.customCursor);
stage.mouseMove = stage.on("stagemousemove", stage.mouseMoveHandler);
stage.mouseMoveHandler();
};
stage.disableCustomCursor = function() // call this method when a frame starts, in a mouse event or whenever you want
{
stage.canvas.style.cursor = "default";
stage.removeChild(stage.customCursor);
stage.customCursor._off = true;
stage.customCursor = null;
stage.off("stagemousemove", stage.mouseMove);
};
stage.mouseMoveHandler = function()
{
stage.customCursor.x = stage.mouseX / stage.scaleX;
stage.customCursor.y = stage.mouseY / stage.scaleY;
};
stage.mouseMoveOutside = true;
stage.enableCustomCursor();
Regards,
JC
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

