I want to be able to spawn multiple images and be able to interact with each individual image.
my function below spawns the images each time I touch the screen but when I need to remove
the image it only removes the last spawned image. What I need is to be able to interact with each
individual image. Thanks!
touchToadd = function (event)
if event.phase == “began” then
image1 = display.newImageRect(“1.png”,50,50)
image1.x = event.x
image1.y = event.y
end
end
addBtn:addEventListener(“touch”,touchToadd)