Very simple cursor problem

Ken Ray kray at sonsothunder.com
Sun Aug 24 15:44:20 EDT 2008


> This seems as basic as it can get. I have an image on a background. On
> mouseEnter and mouseLeave it calls a simple handler in the stack script. The
> script uses a switch statement. On mouseEnter I "set cursor to hand". On
> mouseLeave I "set cursor to arrow". I know the script gets executed because
> I put "put" statements in that put unique messages for mouseEnter and
> mouseLeave. BUT, the cursor never changes.

You need to make sure you lock the cursor or it will immediately change back
to the default cursor. So:

on mouseEnter
  set the lockCursor to true
  set the cursor to hand
  -- etc.
end mouseEnter

on mouseLeave
  set the lockCursor to false  -- restore it to its "idle" state
end mouseLeave

If your app doesn't have the arrow as the main cursor in the program, you
can "set the defaultCursor to arrow" when your app starts up.

HTH,


Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/





More information about the use-livecode mailing list