我该如何模拟使用 Flash 中的 F11(全屏而非最大化浏览器窗口)功能呢?请参考以下链接:http://www.broculos.net/files/articles/FullscreenFlash/flashFullscreen.html。在 Flash 中,您可以使用以下代码实现全屏功能:
fscommand("fullscreen", true )
。permadi.com/tutorial/flash9FullScreen/index.html
Thanks
Update
I found this:
var docElm = document.documentElement;
if (docElm.requestFullscreen) {
docElm.requestFullscreen();
} else if (docElm.mozRequestFullScreen) {
docElm.mozRequestFullScreen();
} else if (docElm.webkitRequestFullScreen) {
docElm.webkitRequestFullScreen();
}
/* Exiting the full screen => showing the FULL SCREEN button */
if (docElm.requestFullscreen) {
document.addEventListener("fullscreenchange", function () {
if(!document.fullscreen) {
// Do something
}
}, false);
} else if (docElm.mozRequestFullScreen) {
document.addEventListener("mozfullscreenchange", function () {
if(!document.mozFullScreen) {
// Do something
}
}, false);
} else if (docElm.webkitRequestFullScreen) {
document.addEventListener("webkitfullscreenchange", function () {
if(!document.webkitIsFullScreen) {
// Do something
}
}, false);
}
根据我所见,这仅在按钮单击时起作用。无法在页面加载时执行此操作。