Hi,
I have an object declared
[lua]local image = display.newImage(“somepic.png”)[/lua]
and I also have some event handlers set on this object, so
[lua]local function=onTOuchEventHandler( event )
end
image:addEventHandler(“touch”,onTouchEventHandler)[/lua]
Now somewhere in the code, I need to change the image from somepic.png to thispic.png
I am missing the setImage equivalent, must be coz it’s past 1:00 in the morning
so what I am doing is
[lua]image:removeSelf() --Suicide
image = display.newImage(“thispic.png”) --Rebirth[/lua]
the issue with this is that the event handler is lost, so how can I change the image without losing the event handler??
cheers,
Jayant C Varma
[import]uid: 3826 topic_id: 3391 reply_id: 303391[/import]