flash实现全屏模式
工作许久才发现什么都没留下,才意识到记笔记的重要性,果断从今天开始写博客~
随便做个FLASH,放一个按钮在上头,实例名设为bnt1.然后绑定这个FLASH类名为Fulltest.
编写Fulltest.as
package {
import flash.display.MovieClip;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.display.Stage;
import flash.display.StageDisplayState;
public class Fulltxttest extends MovieClip{
public function Fulltxttest()
{
this.bnt1.addEventListener( MouseEvent.CLICK, btnClick);
}
protected function btnClick( evt:MouseEvent):void
{
switch(stage.displayState)
{
case "normal":
stage.displayState = "fullScreen";
break;
case "fullScreen":
stage.displayState = "normal";
break;
default:
stage.displayState = "normal";
break;
}
}
}
}