Flash全屏时,键盘除了ESC、alt+F4等系统按键外,都会停止响应。但鼠标事件正常!
HTML代码:
<!DOCTYPE html>
<html>
<head>
<title>全屏</title>
<style type="text/css">
html, body, #myContent
{
height:100%;
}
body
{
margin:0;
padding:0;
overflow:hidden;
}
</style>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
function loadFlash()
{
var flashvars = {};
var parames = {
menu:false,
quality:"high",
allowfullscreen:true,
wmode:"transparent"
};
swfobject.embedSWF("screen.swf", "myContent", "100%", "100%", "9.0.0", "expressInstall.swf", flashvars, parames);
}
window.moveTo(0,0);
window.resizeTo(window.screen.availWidth, window.screen.availHeight);
</script>
</head>
<body onload="loadFlash();">
<div id="myContent">
</div>
</body>
</html>
实例下载:https://files.cnblogs.com/zjfree/screen.rar
ps:博客园在未登录时,是无法访问 https://files.cnblogs.com/ 的。所以做了是否用户登录判断!判断博客园用户是否登录代码如下:
function checkLogin()
{
if($('.author').length == 0)
{
setTimeout(checkLogin,1000);
}
else if($('.author')[0].disabled)
{
//登录处理
}
else
{
//未登录处理
}
}
checkLogin();