288
Chapter 12: Methods
Example
The following handler checks whether the sprite in channel 10 of the current frame has gone past
the right edge of a 640-by-480-pixel Stage and deletes the frame if it has:
-- Lingo syntax
on testSprite
_movie.beginRecording()
if (sprite(10).locH > 640) then
_movie.deleteFrame()
end if
_movie.endRecording()
end
// JavaScript syntax
function testSprite() {
_movie.beginRecording();
if (sprite(10).locH > 640) {
_movie.deleteFrame();
}
_movie.endRecording();
}
See also
beginRecording()
,
endRecording()
,
Movie
,
updateFrame()
deleteGroup
Usage
member(
whichCastmember
).deleteGroup(
whichGroup
)
member(
whichCastmember
).deleteGroup(
index
)
Description
3D command; removes the group from the cast member and the 3D world. Children of the
group are removed from the 3D world but not deleted.
It is not possible to delete the group named World, which is the default group.
Parameters
groupNameOrNum
Required. A string or integer that specifies the name or index position of the
group to delete.
Example
The first line of this example deletes the group Dummy16 from the cast member Scene. The
second line deletes the third group of Scene.
member("Scene").deleteGroup("Dummy16")
member("Scene").deleteGroup(3)
See also
newGroup
,
child (3D)
,
parent
Summary of Contents for DIRECTOR MX 2004
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...