– Handler that gets notified when the alert closes
local function onComplete( event )
if “clicked” == event.action then
local i = event.index
if 1 == i then
– Do nothing; dialog will simply dismiss
elseif 2 == i then
– Open URL if “Learn More” (the 2nd button) was clicked
system.openURL( “http://developer.anscamobile.com” )
end
end
end
– Show alert with two buttons
local alert = native.showAlert( “Corona”, “Dream. Build. Ship.”, { “OK”, “Learn More” }, onComplete ) [import]uid: 88495 topic_id: 34681 reply_id: 334681[/import]