Sprite:removeFromParent

From GiderosMobile
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Available since: Gideros 2011.6
Class: Sprite

Description

If the sprite has a parent, removes the sprite from the child list of its parent sprite.

Sprite:removeFromParent()

This function is equilavent to:

function Sprite:removeFromParent()
	local parent = self:getParent()
	if parent ~= nil then
		parent:removeChild(self)
	end
end