MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING Reference page 39

Director scripting reference
Table of Contents

Advertisement

You can also create empty linear lists. The following statements create empty linear lists.
-- Lingo syntax
workerList = [] -- using the Lingo list operator
workerList = list() -- using list() with no parameters
// JavaScript syntax
var workerList = list(); // using list() with no parameters
Creating property lists
You create a property list in one of the following ways:
In Lingo, use either the top level
the list operator to create a property list, you can use a either a colon to designate name/value
elements and commas to separate elements in the list, or commas to both designate name/value
elements and to separate elements in the list.
In JavaScript syntax, use the top level
designate name/value elements and to separate elements in the list.
When you use the top level
parameters of the function. This function is useful when you use a keyboard that does not provide
square brackets.
Properties can appear more than once in a given property list.
All of the following statements create a property list with four property names—
, and
right
bottom
-- Lingo syntax
sprite1Loc = [#left:100, #top:150, #right:300, #bottom:350]
sprite1Loc = ["left",400, "top",550, "right",500, "bottom",750]
sprite1Loc = propList("left",400, "top",550, "right",500, "bottom",750)
// JavaScript syntax
var sprite1Loc = propList("left",400, "top",550, "right",500, "bottom",750);
You can also create empty property lists. The following statements create empty property lists.
-- Lingo syntax
sprite1Loc = [:] -- using the Lingo property list operator
sprite1Loc = propList() -- using propList() with no parameters
// JavaScript syntax
var sprite1Loc = propList(); // using propList() with no parameters
Setting and retrieving items in lists
You can set and retrieve individual items in a list. The syntax differs for linear and property lists.
To set a value in a linear list, do one of the following:
Use the equals (=) operator.
Use the
setAt()
propList()
propList()
function, you specify the property list's elements as
propList()
—and their corresponding values.
method.
function or the list operator (
function and insert commas to both
Linear lists and property lists
). When using
[:]
,
,
left
top
39

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

This manual is also suitable for:

Director mx 2004

Table of Contents