Hi,
I can’t get them working together. anyone knows how to get button working with director class? I mean to have two states.
local button1 = ui.newButton{
default = “buttonRed.png”,
over = “buttonRedOver.png”,
onRelease = button1,}
local button1 = display.newImage(“images/button1_start.png”)
local function button1t ( event )
if event.phase == “ended” then
director:changeScene(“level1”,“flip”)
end
end
button1:addEventListener(“touch”,button_t)
button1.x = display.contentWidth/2
button1.y = 200
localGroup:insert(button1)
This is not working :/, I tries to remove event listener so button onRelease triggers event, but that didn’t work as well…
If anyone knows how to get that working please let me know.
Cheers [import]uid: 27699 topic_id: 6496 reply_id: 306496[/import]