MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING Reference page 79

Director scripting reference
Table of Contents

Advertisement

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 to which you want to attach the behavior.
Behavior channels
When you create a new behavior, the behavior receives the cast library 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 Lingo
handler The first line contains
on exitFrame
insertion point, and then a line with the word
common Lingo behavior to the frame. To make this handler work with JavaScript syntax, replace
with
on exitFrame
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.
To keep the playhead in a single frame:
In a frame behavior, type the following statement on the line after the
or
function exitFrame()
-- Lingo syntax
_movie.go(_movie.frame)
// JavaScript syntax
_movie.go(_movie.frame);
The Movie object's
statement essentially tells the playhead to "go back to the frame you are currently in."
function exitFrame() {
(JavaScript syntax) statement:
property refers to the frame currently occupied by the playhead. This
frame
, followed by a line with a blinking
on exitFrame
. This makes it easy for you to quickly attach a
end
, and replace
with
end
Writing scripts in the Script window
.
}
(Lingo)
on exitFrame
79

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DIRECTOR MX 2004-DIRECTOR SCRIPTING and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Director mx 2004

Table of Contents