I’m a noob, let’s get that out in the open now. So what I’m trying to do is get an image that has an eventListener attached, hit the event repeatedly. I want an image to go away when touched and then return after a period of time. This part works, what doesn’t work is repeating the process. I’ll post my code of what I have been playing with.
[lua]function boom( event )
local phase = event.phase
local t = event.target
local stage = display.getCurrentStage()
if (phase == “ended”) then
print(“we are here”)
local myIndex = t.myIndex
stage:setFocus( t, event.id )
print("myIndex " … myIndex )
transition.to( object[myIndex], { time=200, alpha=0} )
media.playEventSound( “beep.caf” )
transition.to( object[myIndex], { time=200, alpha=1.0, delay=2500 } )
end
end
The only code after this function is the screen setup. [import]uid: 10638 topic_id: 3291 reply_id: 303291[/import]