import fl.controls.*;
import fl.events.*;
var tela_cheia:Boolean = false;
var botao:Button = new Button();
botao.label = "Tela cheia";
botao.setSize(200, 25);
botao.move(10, 10);
botao.addEventListener(MouseEvent.CLICK, onClick);
addChild(botao);
function onClick(evt:MouseEvent):void {
if(tela_cheia == false){
stage.displayState = StageDisplayState.FULL_SCREEN;
botao.label = "Normal";
tela_cheia = true;
} else {
stage.displayState = StageDisplayState.NORMAL;
botao.label = "Tela cheia";
tela_cheia = false;
}
} |