MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING Reference page 291

Director scripting reference
Table of Contents

Advertisement

deleteOne
Usage
list.deleteOne(value)
deleteOne list, value
Description
List command; deletes a value from a linear or property list. For a property list,
deletes the property associated with the deleted value. If the value appears in the list more than
once,
deleteOne
Attempting to delete a property has no effect.
Parameters
Required. The value to delete from the list.
value
Example
The first statement creates a list consisting of the days Tuesday, Wednesday, and Friday. The
second statement deletes the name Wednesday from the list.
days = ["Tuesday", "Wednesday", "Friday"]
days.deleteOne("Wednesday")
put days
The
statement causes the Message window to display the result:
put days
-- ["Tuesday", "Friday"].
deleteProp
Usage
list.deleteProp(item)
deleteProp list, item
Description
List command; deletes the specified item from the specified list.
For linear lists, replace
deleted. The
deleteProp
the number is greater than the number of items in the list, a script error occurs.
For property lists, replace
property also deletes its associated value. If the list has more than one of the same property,
only the first property in the list is deleted.
Parameters
Required. The item to delete from the list.
item
Example
This statement deletes the color property from the list [#height:100, #width: 200, #color: 34,
#ink: 15], which is called spriteAttributes:
spriteAttributes.deleteProp(#color)
The result is the list [#height:100, #width: 200, #ink: 15].
deletes only the first occurrence.
with the number identifying the list position of the item to be
item
command for linear lists is the same as the
with the name of the property to be deleted. Deleting a
item
also
deleteOne
command. If
deleteAt
deleteProp
291

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