Change cursor in JS

Hi, I would like to change the style of the cursor of an object on rollover.
I tried:


But this does not seem to work. Arrow_Up is my own cursor that is part of the resources in the project. What am I missing?


Hi Rolf,

In the current version (9.1.3), changing the cursor through JS is a bit complicated.
First of all, please make sure the cursor resource is used not only in JS so that ActivePresenter can recognize and export it. For example, you can drag it into a slide as an image and set it initially hidden.
After that, export your project to HTML5, open the HTML5 output resources folder to look for the file name of the cursor resource, say “res_10000.png”
The script to change the cursor will be:
this.cursor('url("resources/res_10000.png"), auto');


Excellent. Thank you, works perfectly.

I want to use this feature for a template that people can use. If the template contains the cursor and later people will add other resources, will the cursor png keep its original name/number?

Best, Rolf

Hi Rolf,

The output cursor png will keep its original name when adding/removing other resources. The output file name will change when the user copies the cursor resource to another project.


1 Like