so heres one code for my bug image
local bug = display.newImage( “roach.png” )
localGroup:insert(bug)
bug.x = -200
bug.y = 300
local function moveit (event)
transition.to(bug, {time=7000, x=-100, y=160})
local function moveback (event)
transition.to(bug, {time=2000, x=600, y=160})
end
timer.performWithDelay (2000, moveback, 1)
end
timer.performWithDelay(5000, moveit, 0)
local function killbug (event)
local blood = display.newImage (“blood.png”)
transition.to( blood, { time=500, delay=3000, alpha=0 } )
blood.x = bug.x
blood.y = bug.y
score.setScore( score.getScore() + 10)
bug:removeSelf()
end
bug:addEventListener(“touch”, killbug)
how can i make it set the alpha to 0 instead of removing it when the player touches it, then back to 1? [import]uid: 10827 topic_id: 4748 reply_id: 304748[/import]