Is there a way to tell if an image is real? as in if someone wrote, ‘display.newImage(“fakeImage.png”)’ and you wanted to tell whether or not that image existed? [import]uid: 147322 topic_id: 28647 reply_id: 328647[/import]
Solved! Here’s one approach:
[lua]local function testImage(image)
local tester=display.newImage(image)
if (not tester) then
print(“Image is not valid!”)
elseif (tester) then
tester:removeSelf()
tester=nil
end
end
testImage()[/lua]
binc [import]uid: 147322 topic_id: 28647 reply_id: 115518[/import]