• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Restoring the Cursor

You might have noticed that changing the cursor back to the arrow cursor when the mouse leaves the sprite involves two hidden assumptions that aren't necessarily true. The first assumption is that the cursor was an arrow before it was changed to a hand. The second assumption is that you want the cursor to remain an arrow unless you explicitly change it again. Although in this simple case, you know the cursor was an arrow, in a complicated movie, it could be anything. Given a good grasp of Lingo, it is relatively simple to determine the current cursor and then save the value before changing it. Then, when the mouse leaves the sprite, the saved value can be used to restore the original cursor.

A more typical situation would be that the cursor is under control of the operating system, and your movie changes it only when specific events occur (like moving over a button). Then, when the mouse leaves the button, the system takes over again. Letting the system have control for most of the time makes sense because the system can be aware of events that you might not be checking for. If your movie is loading a large file from disk, for example, the system can change the cursor to an hourglass until the media is loaded. If you explicitly specify that the cursor is an arrow, then you are preventing the system from displaying the hourglass.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint