Highlighted

Changing Cursor for an entire file

Community Beginner ,
Feb 18, 2020

Copy link to clipboard

Copied

Hey everyone,

 

So I have a very simple need, I need to be able to just change the cursors for buttons to the default. I do this now by going into every button and doing this currently:

 

this.Step1_Btn.cursor = "default";

this.Step2_Btn.cursor = "default";

this.Step3_Btn.cursor = "default";

 

Is there some global command to tell ALL button cursors to react the same way?

 

Usually I just google or search forums but everything I look up is actionscript and with Animates name being... Animate.. it's a harder thing to search up than usual 😞

Adobe Community Professional
Correct answer by ClayUUID | Adobe Community Professional

The code that removes the pointer on mouseout actually sets it to null instead of "default", so you probably want to do that instead regardless of your final solution.

 

The class that manages the cursor state embeds that functionality in a private setter, so there doesn't appear to be any straightforward way to patch it at runtime short of overwriting the entire class. You may have to just open up the CreateJS JavaScript file that's published and change the one instance of "pointer" to null.

TOPICS
Performance

Views

91

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

Changing Cursor for an entire file

Community Beginner ,
Feb 18, 2020

Copy link to clipboard

Copied

Hey everyone,

 

So I have a very simple need, I need to be able to just change the cursors for buttons to the default. I do this now by going into every button and doing this currently:

 

this.Step1_Btn.cursor = "default";

this.Step2_Btn.cursor = "default";

this.Step3_Btn.cursor = "default";

 

Is there some global command to tell ALL button cursors to react the same way?

 

Usually I just google or search forums but everything I look up is actionscript and with Animates name being... Animate.. it's a harder thing to search up than usual 😞

Adobe Community Professional
Correct answer by ClayUUID | Adobe Community Professional

The code that removes the pointer on mouseout actually sets it to null instead of "default", so you probably want to do that instead regardless of your final solution.

 

The class that manages the cursor state embeds that functionality in a private setter, so there doesn't appear to be any straightforward way to patch it at runtime short of overwriting the entire class. You may have to just open up the CreateJS JavaScript file that's published and change the one instance of "pointer" to null.

TOPICS
Performance

Views

92

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
Feb 18, 2020 0
Adobe Community Professional ,
Feb 18, 2020

Copy link to clipboard

Copied

The code that removes the pointer on mouseout actually sets it to null instead of "default", so you probably want to do that instead regardless of your final solution.

 

The class that manages the cursor state embeds that functionality in a private setter, so there doesn't appear to be any straightforward way to patch it at runtime short of overwriting the entire class. You may have to just open up the CreateJS JavaScript file that's published and change the one instance of "pointer" to null.

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...
Feb 18, 2020 0
Community Beginner ,
Feb 18, 2020

Copy link to clipboard

Copied

Thanks, this works! I have a lot of files to do this with, and cutting out the needless task of editting each frame so my buttons don't do this is great.

 

Speedy reply too.

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...
Feb 18, 2020 0