我是用这中方法实现的 退出
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>
我想问的是 我用这种方法实现了 退出到登陆界面能不能与后台断开啊?



SuperITGirl李小扣

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时,程序就会退出了


更多相关文章

  1. android检查手机和无线是否连接的方法
  2. mac下配置Android开发环境完全指南
  3. Android(安卓)WebView 禁止输入
  4. Android(安卓)系统设置默认launcher
  5. 解决init: sys_prop: permission denied uid:1003 name:service.
  6. JNI创建Bitmap
  7. Android(安卓)完全退出应用程序back和home键
  8. android 传递图片的方法
  9. Android(安卓)Studio中如何解决重复依赖导致的app:transformClas

随机推荐

  1. Android 7.0 虚拟按键(NavigationBar)源码
  2. 以Android Library的方式使用 for
  3. 将 apk无线安装到 android 设备中的四种
  4. Android直播开发之旅(8):Android硬编解码
  5. Retrofit系列文章翻译7—在请求体里发送
  6. Android:Parcelable接口
  7. Android TextView使用及性能优化
  8. 关于设置android:imeOptions属性无效的解
  9. android:layout_alignParent 布局相对于
  10. Android高手进阶教程(十一)--Android 通