关键就是下面语句
switch(stage.displayState) {
case "normal":
stage.displayState = "fullScreen";
break;
case "fullScreen":
default:
stage.displayState = "normal";
break;
}
可以按自己需求写两个常用as 1、全屏点击方式
package {
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.events.MouseEvent;
public class fullmask extends MovieClip {
private var _Rect:Sprite;
public function fullmask(b_width:int,b_height:int) {
_Rect = new Sprite();
_Rect.graphics.beginFill(0xff0000,0);
_Rect.graphics.drawRect(0, 0, b_width,b_height);
_Rect.graphics.endFill();
addChild(_Rect);
_Rect.buttonMode = true;
_Rect.addEventListener(MouseEvent.CLICK, clickHandler)
}