Forum Discussion
Change mouse cursor on rollover or use a custom image for cursor
Is it possible to use a custom mouse cursor for an interaction, or change the mouse cursor to an image instead of the pointing hand?
I have been asked to do this and I can't figure out a way to make it happen.
Thank you so much for your help!!
34 Replies
Hi Dan! It looks like you have found the best threads, and hopefully someone will be able to assist you with this design set up :) I will link your other thread for anyone in the community that may run across this as well.
- DanBeattyCommunity Member
Thanks!
Hi Dan!
One more FYI :) When you reply to the forums via e-mail, your signature is attached. Please feel free to pop in and edit if needed.
- DanBeattyCommunity Member
ooo. good to know. thanks.
- S-JBirchCommunity Member
I am looking at a way to do this in Storyline 2 - and I am mucking about with javascript in order to do it. It is possible within the HTML specifications to swap a system cursor out with a custom image.
Check method for the result http://www.ajaxblender.com/article-sources/jquery/custom-cursors/index.html. The jQuery method seems to be the most powerful.
Question is: Would this be possible in Storyline 2 output?
Hi Soren! Hopefully someone more versed in JavaScript will be able to pop in and assist you here. I'm not familiar with that nor do we offer support for JavaScript.
- WilliamWallaceCommunity Member
Bringing this back up because being able to control what the cursor looks like within Storyline based on the user's interactions is a really useful feature. I've used it in many other programs, please consider adding this to the next version of Storyline.
Hi William!
You are welcome to share your thoughts with our product development team here.- CoryWarshawsky-Community Member
Much like Dan, I want to be able to "hijack" the learner's actual mouse cursor.
An example usage: I'd love for the learner's mouse to become a pen. As soon as the learner's cursor moves from anywhere on their desktop to landing over the storyline file, I want the cursor to become the pen. (or at least automatically have an image of a pen hover directly under it.)
Here is an example of a website that does this: http://www.3h-i.com/
Would be extra cool if the pen was a highlighter and the learner could actually highlight something on screen. Or the cursor automatically left a translucent yellow line as the learner moved it across a slide.
- OrestMykyta-e8aCommunity Member
This can be done with some Javascript. Make a trigger that runs the following JS:
document.getElementById("slide").style.cursor = "crosshair";
Replace "crosshair" with the type of mouse cursor that you want the user to have from the list below. BUT: This will change the user's mouse cursor for the rest of the course, until it is changed back. So you have to have another trigger somewhere to set the cursor back to "auto".
Here are some common cursors that are included with all modern browsers. They may look a bit different depending on the browser and OS:
- auto (Usually an arrow, but turns into the i-beam over selectable text)
- default (the normal arrow)
- crosshair (a plus sign)
- pointer (usually a hand with the index finger)
- grab (an open hand)
- none (makes the cursor invisible!)
- text (the "i-beam" cursor for selecting text
- wait (a spinning icon like when your computer is loading something)
- progress (the spinning icon with an arrow
For a more complete list with examples see here: https://www.w3schools.com/cssref/playit.asp?filename=playcss_cursor
Using your own custom image is a bit more involved... You'd have to use the "url" cursor in the javascript above, save the image as a .cur file, add it into your Storyline output folder...
- NunoCardosoCommunity Member
Hi all!
You can change the cursor to the image that you would like. See it working in the following link:
- LaurieBluemCommunity Member
I see your example. Can you explain how it is done?
- DanKonigCommunity Member
Hello Nuno,
That's exactly what I need! How did you do this?
- JudithSandersCommunity Member
I like it Nuno, but there is no explanation how you did it / or a script attached to your nice example. It's perfect indeed!
Related Content
- 4 months ago
- 7 months ago
- 9 months ago