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时,程序就会退出了
posted on 2012-05-27 15:04 SuperITGirl李小扣 阅读(1112) 评论(0) 收藏 举报
浙公网安备 33010602011771号