Page 1

Interactive Programming

Unit 3.3 – Introduction to Lingo Programming

Presentation 1


Objectives At the end of this presentation, you will be able to:  Identify the various types of Lingo scripts  Describe the need for each type of script


Introduction 

Interactive presentation refers to multimedia packages that require user interaction for navigation.

Navigation implies that the users must be able to move around the movie in their own way.

To navigate to the desired locations in a movie, scripts can be added to the movie.


Lingo Script  

 

Lingo is the scripting language of Director. Scripting refers to writing codes to instruct an application to perform certain function based on the action performed. The actions that occur while a movie is playing is called event. Lingo can be used to add interactivity to the movie.


Types of Lingo Scripts 

Some of the important types of Lingo scripts are: 

Frame script

Sprite script

Cast script

Movie script


Frame Script   

Scripts that are attached to the frame in the Score window. These scripts are written in the respective frame in the behavior channel. Frame scripts respond to the events relating to a frame.


Frame Script 

The most common uses of the frame script are: 

To make the playback head move to a particular frame.

To stop/pause the playback head in a frame until a specific event occurs. on exitFrame me go to the frame end

Frame script used to stop play head at specific frame


Script Window 

The name of the window appears as Script:Behavior Script 6:Wait. 

The first part, Script, implies that it is a script window.

The second part implies that the script written is a Behavior script.

The number 6 implies that the script is stored as the sixth cast member in the Cast window.

The last part implies that the name of the cast member is Wait.


Sprite Script  

Sprites are the cast members that are placed on the Score or Stage window. Scripts that are attached to the sprites are called sprite scripts. on mouseUp me go to “apple” end

Sprite script used to specify action to be performed when the mouse is clicked


Cast Scripts 

Scripts that are attached to the cast members in the Cast window. on mouseUp go “home” end

Cast script used to perform the action HOME button go to the first frame


Movie Script   

Scripts that are used to control the entire movie. They can handle events such as keyUp, mouseUp, startMovie and stopMovie. Events get executed when the keys or mouse buttons are pressed respectively. on mouseUp alert “Hai” end

Movie script used to display alert message “Hai”


Summary

In this session, you learnt the following:  Lingo is the scripting language of Director.  Frame scripts are scripts that are attached to the frame in the Score window.  Sprite scripts are scripts that are attached to the sprites.


Summary In this session, you learnt the following:  Cast scripts are scripts that are attached to the cast members in the Cast window.  Movie scripts are scripts that are used to control the entire movie.

Lingo prog  

Simple notes about Lingo

Advertisement