Image Object exist

how can we detect whether an image object exist?

it’s to ensure if it’s create, skip that logic
if (myObj.isExist) ==> skip init new image object
else myObj = display.newImage(…)
it’s useful to check whether user deleted the object, to allow system re-create [import]uid: 10373 topic_id: 3728 reply_id: 303728[/import]

hi weilies,
did you try,

local myObj = nil

.
.
.

if myObj == nil then
myObj = display.newImage(…)
end

and if you de-allocate it at any point

myObj = nil

hth,

cheers,

Jayant C Varma [import]uid: 3826 topic_id: 3728 reply_id: 11388[/import]

thanks pal! [import]uid: 10373 topic_id: 3728 reply_id: 11393[/import]