我是用这中方法实现的 退出
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):void 2 { 3 NativeApplication.nativeApplication.exit(); 4 }
这样,当点击button时,程序就会退出了