MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING Reference page 325

Director scripting reference
Table of Contents

Advertisement

getaProp
Usage
propertyList.propertyName
getaProp(list, item)
list[listPosition]
propertyList [ #propertyName ]
propertyList [ "propertyName" ]
Description
List command; for linear and property lists, identifies the value associated with the item specified
by
,
item
listPosition
When the list is a linear list, replace
shown by
listPosition
When the list is a property list, replace
The result is the value associated with the property.
The
command returns
getaProp
When used with linear lists, the
command.
getAt
Parameters
itemNameOrNum
in the list to return; for property lists, a symbol (Lingo) or a string (JavaScript syntax) that
specifies the property whose value is returned.
Example
This statement identifies the value associated with the property #joe in the property list ages,
which consists of [#john:10, #joe:12, #cheryl:15, #barbara:22]:
put getaProp(ages, #joe)
The result is 12, because this is the value associated with the property #joe.
The same result can be achieved using bracket access on the same list:
put ages[#joe]
The result is again 12.
If you want the value at a certain position in the list, you can also use bracket access. To get the
third value in the list, associated with the third property, use this syntax:
put ages[3]
-- 15
Note: Unlike the
error will occur if the property doesn't exist when using bracket access.
See also
getAt, getOne(), getProp(), setaProp,
, or
propertyName
. The result is the value at that position.
VOID
getaProp
Required. For linear lists, an integer that specifies the index position of the value
command where
getAProp
in the list specified by
with the number for an item's position in a list as
item
with a property in the list as in
item
when the specified value is not in the list.
command has the same function as the
is returned when a property doesn't exist, a script
VOID
setAt
.
list
propertyName
getaProp
.
325

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