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

Chapter 11. Deeper into Lingo > Points to remember

Points to remember

Here are some of the key concepts we covered in this chapter:

  • Use double hyphens before lines of Lingo to disable their execution or to include comments in your scripts. The Script window includes buttons that add and remove these hyphens automatically.

  • To trigger actions when the mouse rolls over a specific sprite, you can use the rollOver function or the event messages mouseEnter, mouseWithin, and mouseLeave. The function can be used to group behaviors for multiple elements on the Stage, but the events must be attached to individual Cast members or sprites.

  • Any custom handlers contained in a movie script can be invoked by Lingo in score scripts (on the frame or sprite level), in Cast member scripts, and in movie scripts.

  • Use the repeat with construction to apply Lingo to several sprites in sequence.

  • You can introduce layers of conditionality in scripting with the if…then…else construction, but take care to balance each if with an end if; a tidier approach is to use the keywords case and otherwise. Use the command nothing when you need to even out levels of instruction.

  • Properties pertaining to the timeOut event can be used to trigger actions after a certain period of time has passed without specific activity on the part of the end user.

  • To change the appearance of a sprite on the Stage, try switching its source Cast member by resetting its memberNum property.

  • You can change the cursor to another standard cursor, to a bitmap for use as a cursor, or to a series of Cast members designated as an animated cursor. Custom cursors can be applied overall or associated with specific sprites.

  • To limit the area in which a moveable sprite can be moved, use the constraint sprite property to give it boundaries inside another Cast member (which can be invisible to the end user).

  • Official warning-type dialog boxes can be created with the alert command.

  • You can install custom menus in your movie with the installMenu command. Special characters can even specify shortcuts and simulate display effects (check marks, boldfacing, dimming of unavailable commands, and so on).



Not a subscriber?

Start A Free Trial

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