flash 怎么全屏播放

2024-12-15 14:46:52
推荐回答(1个)
回答1:

添加代码,打开时就是全屏fscommand("fullscreen","true");
或者添加右键菜单控制:
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;