286
Chapter 12: Methods
delete()
Usage
-- Lingo syntax
fileioObjRef
.delete()
// JavaScript syntax
fileioObjRef
.delete();
Description
Fileio method; Deletes a file.
Parameters
None.
See also
Fileio
deleteAt
Usage
list.deleteAt(
number
)
deleteAt
list
,
number
Description
List command; deletes an from a linear or property list.
The
deleteAt
command checks whether an item is in a list; if you try to delete an object that
isn’t in the list, Director displays an alert.
Parameters
number
Required. Specifies the position of the item in the list to delete.
Example
This statement deletes the second item from the list named designers, which contains [gee,
kayne, ohashi]:
designers = ["gee", "kayne", "ohashi"]
designers.deleteAt(2)
The result is the list [gee, ohashi].
This handler checks whether an object is in a list before attempting to delete it:
on myDeleteAt theList, theIndex
if theList.count < theIndex then
beep
else
theList.deleteAt(theIndex)
end if
end
See also
addAt
Summary of Contents for DIRECTOR MX 2004-DIRECTOR SCRIPTING
Page 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Page 48: ...48 Chapter 2 Director Scripting Essentials...
Page 100: ...100 Chapter 4 Debugging Scripts in Director...
Page 118: ...118 Chapter 5 Director Core Objects...
Page 594: ...594 Chapter 12 Methods...
Page 684: ...684 Chapter 14 Properties See also DVD...
Page 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Page 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Page 1102: ...1102 Chapter 14 Properties...