Looping The Playhead With Lingo; Write A Handler - Adobe 65036570 - Director - PC Tutorial

Create a basic movie in director
Hide thumbs Also See for 65036570 - Director - PC:
Table of Contents

Advertisement

Director supports scripting in two languages: Lingo and JavaScript syntax. In this tutorial, you will script in Lingo
only, but if you are already familiar with JavaScript, you may want to try JavaScript syntax instead. Lingo is designed
to be easy to learn, so don't be intimidated. After you know the basic concepts, you can use the extensive scripting
vocabulary to control anything in your movie.

Looping the playhead with Lingo

The scenes of your movie are not much good as scenes if the playhead simply races through them without stopping
to let the user absorb their content. In this movie, the playhead must stay in one scene until the user makes a decision
to go to a different scene. In this tutorial, you will add Lingo to a special Script channel in the Score and to your
button sprites.
To make the playhead stay in one scene, you loop it in a single frame or a series of frames. For the start scene and the
sound and video scene, the playhead can loop in one frame. For the animation scene, where the animation occurs
over a series of frames, the playhead should loop over the same series of frames.
To control the movement of the playhead without using buttons, you use the Script channel in the Score. As with the
sound channels, the Script channel is one of the effects channels that appear above the frame number bar in the
Score.

Write a handler

The start scene is the first one that needs a script to loop the playhead. Each time the playhead leaves one frame to
go to the next, an event, called an
in Director. Your first script will use the
Each script you write is composed of handlers. A handler is a set of Lingo commands that handle a specific event,
such as the
event. Some scripts have only one handler and some have multiple handlers. Each handler
exitFrame
begins with the name of the triggering event, such as
When you need to enter or edit scripts in Director, you use the Script window. Each script becomes a cast member.
The Script window contains tools for editing scripts easily.
In the Script channel of the Score, double-click frame 10, the last frame of the start scene. The Script window
1
opens, and it already includes a default handler:
on exitFrame me
end
In between these two lines of script, enter the following additional script:
2
_movie.go(_movie.frame)
The result is a handler that should look like this:
on exitFrame me
_movie.go(_movie.frame)
end
3
Close the Script window. The new script cast member appears in the Cast window in the first available cast slot.
A sprite for the script also appears in the Script channel in frame 10.
Script channel
event, occurs. In this case, the word event refers to an action executed
exitFrame
event as its trigger.
exitFrame
exitFrame
, and ends with the word
end
ADOBE DIRECTOR 11.0
Create a basic movie
.
26

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Director 11

Table of Contents