SuperITGirl李小扣 air for android做的flash客户端,退出程序的方法~~
16lz
2021-01-25
我是用这中方法实现的 退出
public function altershow(event:Event):void{
Alert.show("确定退出吗?","",Alert.NONMODAL|Alert.OK|Alert.NO,this,button1_clickHandler);
}
protected function button1_clickHandler(event:CloseEvent):void
{
// TODO Auto-generated method stub
if(event.detail== Alert.OK){
navigateToURL(new URLRequest("javascript:location.close();"),"_self");
}
}
]]>
</fx:Script>
<s:panel x="213" y="65" width="250" height="200">
<s:Button x="33" y="93" label="退出" click="Fresh(event)"/>
<s:Button x="138" y="93" label="按钮" click="altershow(event)"/>
</s:panel>
我想问的是 我用这种方法实现了 退出到登陆界面能不能与后台断开啊?
public function altershow(event:Event):void{
Alert.show("确定退出吗?","",Alert.NONMODAL|Alert.OK|Alert.NO,this,button1_clickHandler);
}
protected function button1_clickHandler(event:CloseEvent):void
{
// TODO Auto-generated method stub
if(event.detail== Alert.OK){
navigateToURL(new URLRequest("javascript:location.close();"),"_self");
}
}
]]>
</fx:Script>
<s:panel x="213" y="65" width="250" height="200">
<s:Button x="33" y="93" label="退出" click="Fresh(event)"/>
<s:Button x="138" y="93" label="按钮" click="altershow(event)"/>
</s:panel>
我想问的是 我用这种方法实现了 退出到登陆界面能不能与后台断开啊?
air for android做的flash客户端,退出程序的方法~~
下面是一个view视图:
<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" title="有人认输啦~~~"
xmlns:mx="library://ns.adobe.com/flex/mx" resize="view1_resizeHandler(event)" xmlns:myGraduationDesign="myGraduationDesign.*">
………………
有一个button
<s:Button id="quit" label="退出" click="gameOver(event)" />
则,game0ver是此按钮响应退出程序的函数
1 protected function gameOver(event:MouseEvent):void2 {3 NativeApplication.nativeApplication.exit();4 }
这样,当点击button时,程序就会退出了
更多相关文章
- android检查手机和无线是否连接的方法
- mac下配置Android开发环境完全指南
- Android(安卓)WebView 禁止输入
- Android(安卓)系统设置默认launcher
- 解决init: sys_prop: permission denied uid:1003 name:service.
- JNI创建Bitmap
- Android(安卓)完全退出应用程序back和home键
- android 传递图片的方法
- Android(安卓)Studio中如何解决重复依赖导致的app:transformClas