In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

全画面モード確認

Get Adobe Flash player
by mash 24 Jan 2009
    Embed
// write as3 code here..
package {
    import flash.display.Sprite;
    import flash.display.Stage;
    import flash.events.MouseEvent;
    public class Test extends Sprite {
        public function Test() {
            var btn :Sprite = new Sprite;
            addChild( btn );
            btn.graphics.beginFill(0xFF0000);
            btn.graphics.drawRect(0,0,100,100);
            btn.buttonMode = true;
            btn.addEventListener( MouseEvent.CLICK, onclick );
        }
        private function onclick( e :MouseEvent ) :void {
            switch(stage.displayState) {
                case "normal":
                    stage.displayState = "fullScreen";
                    break;
                case "fullScreen":
                default:
                    stage.displayState = "normal";
                    break;
            }
        }
    }
}