i’ve got a directory with 10 images. (image1.png, image2.png…)
I’ve written some code that when i tap a button, it shows the next image.
function button:tap( event )
if x == 10 then
x = 0
else
x = x + 1
end
myImage = display.newImage( "image"..x..".png" )
end
I want to hide a button in image7.png that will take the user to another set of images.
i tried myImage.name == “image7.png” and myImage.filename == “image7.png” to compare filenames, but it doesn’t seem to work. How do i call the filename property (attribute ?) of myImage?
i just started Lua and looked but couldn’t find an example. I’m sure it’s out there…
thanks in advance [import]uid: 9662 topic_id: 2433 reply_id: 302433[/import]