Hi
I have Data entries as per the coffee scroll list example but want the images themselves to be buttons.
so I have
[lua]data[6] = {}
data[6].title = “Americano”
data[6].subtitle = “Espresso with hot water”
data[6].image = “coffee6.png”
local redbutton = display.newImage (“redbutton.png”)
redbutton.x = 400
redbutton.y = 100
g:insert(redbutton)
redbutton:addEventListener( ‘touch’, function( e )
if e.phase == “ended” then
print “hi”
Reward.text = tostring(tr[1])
director:changeScene (“screen1”)
end
end)
I’d want the redButton instead to be data[6].image so when I press data[6].image, then it does the changeScene.
Any ideas? [import]uid: 43191 topic_id: 8457 reply_id: 308457[/import]
