for some reason this “alert” pops up as soon as the level starts up, i only want it to pop up when you presses the “skip” button, how can i make it do this? thanks!
[code]
local skip = display.newImage (“skip.png”)
localGroup:insert(skip)
skip.x = 305
skip.y = 50
local function onComplete( event )
print( "index => "… event.index … " action => " … event.action )
local action = event.action
if “clicked” == event.action then
if 2 == event.index then
director:changeScene (“mainmenu”)
end
elseif “cancelled” == event.action then
end
end
local alert = native.showAlert( “Skip Level?”, “Are you sure you want to skip this level?”, { “Cancel”, “Yes” }, onComplete )
[/code] [import]uid: 10827 topic_id: 9657 reply_id: 309657[/import]