Writing Scripts with Lingo
387
The best approach is to start simple and test your work frequently. When you get one part of a
script working, start writing the next part. This approach helps you identify bugs efficiently and
ensures that your Lingo is solid as you write more complex scripts.
For more information about debugging scripts, see “Troubleshooting Lingo”.
Performing common tasks
The following are ways to perform common tasks for creating, attaching, and opening scripts.
To create a frame behavior (script attached to a frame):
•
Double-click the behavior channel in the frame that you want to attach a behavior to.
When you create a new behavior, the behavior receives the cast number of the first available
location in the current Cast window.
When you create a new frame behavior, the Script window opens and already contains the line
on
exitFrame
, followed by a line with a blinking insertion point, and then a line with the word
end
.
This makes it easy for you to quickly attach a common behavior to the frame.
One of the most common frame behaviors is one that keeps the playhead looping in a single
frame. This can be useful when you want your movie to keep playing in a single frame while
waiting for the user to click a button or for a digital video or sound to finish playing.
Behavior channel
Summary of Contents for DIRECTOR MX-USING DIRECTOR MX
Page 1: ...Using Director MX Macromedia Director MX...
Page 12: ...Contents 12...
Page 156: ...Chapter 4 156...
Page 202: ...Chapter 6 202...
Page 244: ...Chapter 7 244...
Page 292: ...Chapter 10 292...
Page 330: ...Chapter 12 330...
Page 356: ...Chapter 13 356...
Page 372: ...Chapter 14 372...
Page 442: ...Chapter 16 442...
Page 472: ...Chapter 18 472...
Page 520: ...Chapter 19 520...
Page 536: ...Chapter 20 536...
Page 562: ...Chapter 23 562...
Page 566: ...Chapter 24 566...
Page 602: ...Chapter 27 602...