SuperITGirl李小扣 air for android做的flash客户端,退出程序的方法~~

我是用这中方法实现的 退出
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):void
2             {
3                 NativeApplication.nativeApplication.exit();
4             }

这样,当点击button时,程序就会退出了


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值