Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
remove object from a scene on tween complete — Gideros Forum

remove object from a scene on tween complete

boriskeyboriskey Member
edited July 2014 in Game & application design
Hi guys,

how I can modify this example to remove the object (sprite) from a scene once tween animation is complete?

myscene.lua:
------------------

local tween = GTween.new(sprite, 10, animate, properties)

--adding event on animaiton complete
tween:addEventListener("complete", function()
stage:removeChild(sprite)
sprite = nil
end)

Basically in my scene I have some special effect that will produce 5-10 sprites and animate them and after 1 second should kill them.

Comments

Sign In or Register to comment.