User Guide

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