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

Chapter 11. Deeper into Lingo > Constraining sprite movement

Constraining sprite movement

We've made our rightmost figure moveable by the user, and we've added a custom cursor to underscore that point. Presumably, the user could figure out the possible interaction and would have some fun dragging the character hither and yon.

But what if we want to limit the area of movement? Right now, the mouse can be used to move the sprite not only anywhere on the Stage but completely off it (how far off depends on the size of your monitor). Let's fence in our wandering Swifty.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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