I create a scene using director
When I go to the next scene(3)
textPicaflor and tiger remains in the scene 3
I try to remove the objects from the function OntouchPica.
that part is the problem.
module(…,package.seeall)
function new()
local localGroup=display.newGroup();
local rightArrow = display.newImageRect(“next.png”, 128, 128)
rightArrow.x = 365
rightArrow.y = 300
local bird = display.newImageRect(“single_bird.png”, 236, 187)
bird.x = 397
bird.y = 218
local function onTouchPica(event)
if “ended” == event.phase then
local textPicaflor = display.newText(“Hola condor”, 155, 50, native.systemFont, 46)
textPicaflor:setTextColor(155, 205, 255)
local tiger = display.newImageRect( “tiger.png”, 128, 128 )
tiger.x = 150
tiger.y = 141
end
end
bird:addEventListener(“touch”,onTouchPica)
localGroup:insert(rightArrow)
localGroup:insert(bird)
return localGroup;
end [import]uid: 121136 topic_id: 34806 reply_id: 334806[/import]