//打开就全屏Stage.focus设置焦点 fscommand("fullscreen","true");//关闭代码fscommand("quit"); //或者添加右键菜单控制: var myMenu:ContextMenu = new ContextMenu(); myMenu.hideBuiltInItems(); var item:ContextMenuItem = new ContextMenuItem("全屏"); myMenu.customItems.push(item); function fullScreen(evt:ContextMenuEvent):void { if (item.caption == "全屏") { fscommand("fullscreen","true"); item.caption = "退出全屏"; } else { fscommand("fullscreen","false"); item.caption = "全屏"; } } item.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT,fullScreen); contextMenu = myMenu;