hey all,
newbie question here. I am trying to remove an object when it gets to the left side of the screen. my code is something like this:
hero_false = display.newImage(“hero.png”)
function move (event)
hero_false.x = hero_false.x-10
end
timer.performWithDelay(100, move, 0)
function remove_hero_false (event)
if hero_false.x <= 45 then
hero_false:removeSelf()
hero_false = nil
end
return true
end
Runtime:addEventListener(“enterFrame”, remove_hero_false )
I get an error when do this. How do I correctyl set the object to nil? Thanks in advance.
SM [import]uid: 79586 topic_id: 28746 reply_id: 328746[/import]