Using Director > Director basics > About adding interactivity with Lingo

 

About adding interactivity with Lingo

Lingo, Director's scripting language, adds interactivity to a movie. Lingo can accomplish many of the same tasks—such as moving sprites on the Stage or playing sounds—that you can accomplish using the Director interface.

Much of Lingo's usefulness, however, is in the flexibility it brings to a movie. Instead of playing a series of frames exactly as the Score dictates, Lingo can control the movie in response to specific conditions and events. For example, whether a sprite moves can depend on whether the user clicks a specific button; when a sound plays can depend on how much of the sound has already streamed from the Internet.

Director includes a set of prepackaged Lingo instructions, called behaviors, that you can simply drag to sprites and frames. Behaviors let you add Lingo's interactivity without writing Lingo scripts yourself. You can modify behaviors or create your own. For more information about the behaviors included with Director 8, see Using Director 8 Behaviors in the Director Support Center.

If you prefer writing scripts to using the Director interface and behaviors, Lingo provides an alternative way to implement common Director features; for example, you can use Lingo to create animation, stream movies from the Web, perform navigation, format text, and respond to user actions with the keyboard and mouse.

Writing Lingo also lets you do some things that the Score alone can't do. For example, Lingo's lists let you create and manage data arrays, and Lingo operators let you perform mathematical operations and combine strings of text.

For more general information about Lingo, see Writing scripts with Lingo overview.