Hello, I am working on my first app called “touch the monkey” All it is a magic eight ball with a monkey. However i took out the shake event of the eight ball and put in my own touch event for the monkey. So you ask an important question, touch the monkey, and a yes, no, or maybe will pop up on screen. So I cant get it to work
local w = display.contentWidth
local h = display.contentHeight
monkey = display.newImage(“monkey.png”)
monkey.x = w/2
monkey.y = h/2
local textfield = display.newText("",w/2-5, h/2 + 40, nil, 24)
local options = {“Yes”, “No”, “Maybe”}
local function touchmonkey (e)
if (“e.phase”== ended) then
textfield.text = options[math.random(1,3)]
end
end
monkey:addEventListener(“touch”, touchmonkey) [import]uid: 75779 topic_id: 14738 reply_id: 314738[/import]
[import]uid: 52491 topic_id: 14738 reply_id: 54521[/import]