ActionSheetANE is a native extension that allows the use of UIActionSheet on iOS. A UIActionSheet presents the user with a set of alternatives for how to proceed with a given task. It’s possible to use action sheets to prompt the user to confirm a potentially dangerous action.
The extensions can create an action sheet containing a title and one or more buttons, each of which corresponds to an action to take. The developer can monitor which button was clicked using events.
Sample
import net.nodera.ane.ActionSheetANE; import net.nodera.ane.event.ActionSheetEvent; import flash.events.MouseEvent; import flash.events.Event; actionBtn.addEventListener(MouseEvent.CLICK, function(e:MouseEvent):void { var actionSheet:ActionSheetANE = new ActionSheetANE(); actionSheet.addEventListener(ActionSheetEvent.CLICK_BUTTON, onActionSheetClick); actionSheet.addEventListener(ActionSheetEvent.CLICK_CANCEL, onActionSheetCancel); actionSheet.addEventListener(ActionSheetEvent.CLICK_DESTRUCTIVE, onActionSheetDestructive); actionSheet.show("title","CANCEL", "","button1, button2, button3"); }); function onActionSheetCancel(e:ActionSheetEvent):void { info.text = "CANCELED:" + e.index.toString(); } function onActionSheetClick(e:ActionSheetEvent):void { info.text = "CLCIKED:" + e.index.toString(); } function onActionSheetDestructive(e:ActionSheetEvent):void { info.text = "DESTRUCTIVED:" + e.index.toString(); }
RT @as3gamegears: New: ActionSheetANE (native extension to use UIActionSheet on iOS) http://t.co/ypajlg6sVt #as3 #flash #gamedev