Hi yall I’m having problems with the Native Alert when trying to change scene ok the problem is when the ball collides with a box the Native Alert shows just how I wanted. But when I click on the button the scene does not change is like if my click was cancelled here is the code
[code]local function onClicks(event)
if event.action == “clicked” then
elseif event.index == 1 then
director:changeScene (“menu”, “flip”)
elseif event.index == 2 then
director:changeScene (“menu”)
end
end
– Display Alert
function onCollision5( event )
if event.phase == “began” and event.other.name == “bg22” then
physics.pause()
local alerts = native.showAlert(“Congratulations”, “Level 1”, {“Main Menu”, “Redo”}, onClicks)
end
end
ball.preCollision = onLocalPreCollision
ball:addEventListener( “collision”, onCollision5) [/code]
Yeah as I say it again when I click on Main menu or Redo no scene changes the buttons acts like if they been cancelled
Help is appreciated [import]uid: 17058 topic_id: 20043 reply_id: 320043[/import]
[import]uid: 52491 topic_id: 20043 reply_id: 78240[/import]