Stencyl 3.4.0 is now out. Get it now!

Setting MouseCursor hand?

minu94

  • Posts: 38
Hi,

I wonder if there's a way to set the cursor to "Hand".
I got it on flash, but work on flash only.
Any tips?
Follow my game projects on twitter: https://twitter.com/manuDaje

merrak

  • *
  • Posts: 1634
Isn't that behavior usually determined by the OS or browser?

One solution: A way to get a custom mouse cursor is to make an actor that follows the mouse. Just make your actor the "Hand". You can then swap animations based on what the cursor is near (hand vs pointer vs etc.) You'll want to use the 'hide mouse cursor' block to hide the default cursor.

Probably not the ideal solution since it'll be a bit of work to set up, and you won't get the official system cursor this way. On the other "hand", you'll be able to do customizations you couldn't otherwise.

minu94

  • Posts: 38
Yes. I thought that, I implemented that method aswell, but not work so good cause it lag a bit.
There's no way to write the code in pure haxe?
Here's my code for flash:
Follow my game projects on twitter: https://twitter.com/manuDaje

JeffreyDriver

  • Posts: 1305
Using an actor shouldn't cause lag. Did you remove the collision shapes?

minu94

  • Posts: 38
i did it few years ago, but from what i remember, yeah, I removed collisions.
I mean, the actor never would be fast as the cursor, so that's should cause "lag"
Follow my game projects on twitter: https://twitter.com/manuDaje