I want to change image for every banana that I have…
so let’s say I have 1 banana the image would be a basket with one banana
when the banana count is 2 then the image would be a basket with two banana and so on…
I have created the images, but don’t know the easiest way to change them…
I currently use
basket = display.newImage(“basketWithzerobanana.png”)
function bananacheck ()
if banana == 1 then
basket = display.newImage(“basketWithonebanana.png”)
elseif banana == 2 then
basket = display.newImage(“basketWithtwobanana.png”)
end
end
Runtime:addEventListener (“enterFrame”, bananacheck)
And it doesn’t work… could someone help me? [import]uid: 117857 topic_id: 22093 reply_id: 322093[/import]
[import]uid: 52491 topic_id: 22093 reply_id: 87786[/import]
[import]uid: 6084 topic_id: 22093 reply_id: 109562[/import]