stop();
Stage.align = "LT";
Stage.scaleMode = "noScale";
function setFP() {
logo_mc._x = logo_mc._y=50;
logo_mc.setSize(Stage.width-100, Stage.height-100);
bg._x = bg._y=25;
bg._width = Stage.width-50;
bg._height = Stage.height-50;
fsbtn._x = Stage.width/2-75;
}
var ssListener:Object = new Object();
ssListener.onResize = setFP;
Stage.addListener(ssListener);
function createRectangle(l:Number, t:Number, w:Number, h:Number, bgColor:Number, name:String):MovieClip {
var mc:MovieClip = this.createEmptyMovieClip(name, this.getNextHighestDepth());
mc.beginFill(bgColor);
mc.lineTo(w, 0);
mc.lineTo(w, h);
mc.lineTo(0, h);
mc.lineTo(0, 0);
mc._x = l;
mc._y = t;
return mc;
}
createRectangle(25, 25, Stage.width-50, Stage.height-50, 0x006600, "bg");
_root.createTextField("fsbtn", _root.getNextHighestDepth(), Stage.width/2-75, 5, 150, 20);
fsbtn.html = true;
fsbtn.htmlText = "点击这里进入全屏显示模式";
function swidthfullscreenmode() {
if (Stage["displayState"] == "normal") {
Stage["displayState"] = "fullScreen";
fsbtn.htmlText = fsbtn.htmlText.split("进入全屏").join("返回窗口");
} else {
Stage["displayState"] = "normal";
fsbtn.htmlText = fsbtn.htmlText.split("返回窗口").join("进入全屏");
}
}
_root.createEmptyMovieClip("logo_mc", _root.getNextHighestDepth());
var mclListener:Object = new Object();
mclListener.onLoadInit = function(target_mc:MovieClip) {
_root.onEnterFrame = function() {
if (target_mc._currentframe>=3) {
setFP();
delete this.onEnterFrame;
}
};
};
var image_mcl:MovieClipLoader = new MovieClipLoader();
image_mcl.addListener(mclListener);
image_mcl.loadClip(_root._url.slice(0, _root._url.lastIndexOf("/", _root._url.length))+"/"+"AAA.swf", logo_mc);
swidthfullscreenmode();