<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx=" http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
<fx:Declarations>
<!-- 最大化、最小化窗口代码 -->
</fx:Declarations>
<fx:Script>
<![CDATA[
private function Full(event:MouseEvent):void{
if(this.stage.displayState == StageDisplayState.FULL_SCREEN){//当前全屏
this.stage.displayState = StageDisplayState.NORMAL;
this.stage.scaleMode = StageScaleMode.NO_SCALE;
}else{//切换为全屏
this.stage.displayState = StageDisplayState.FULL_SCREEN;
this.stage.scaleMode = StageScaleMode.NO_SCALE;
}
}
]]>
</fx:Script>
<mx:Button label="全屏" click="Full(event)" x="28" y="26" width="61" height="37" fontSize="21"/>
</s:Application>
<s:Application xmlns:fx=" http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
<fx:Declarations>
<!-- 最大化、最小化窗口代码 -->
</fx:Declarations>
<fx:Script>
<![CDATA[
private function Full(event:MouseEvent):void{
if(this.stage.displayState == StageDisplayState.FULL_SCREEN){//当前全屏
this.stage.displayState = StageDisplayState.NORMAL;
this.stage.scaleMode = StageScaleMode.NO_SCALE;
}else{//切换为全屏
this.stage.displayState = StageDisplayState.FULL_SCREEN;
this.stage.scaleMode = StageScaleMode.NO_SCALE;
}
}
]]>
</fx:Script>
<mx:Button label="全屏" click="Full(event)" x="28" y="26" width="61" height="37" fontSize="21"/>
</s:Application>