日期:2014-05-17  浏览次数:20928 次

关于Flash获取焦点的问题!!
我有一个游戏flash放在一个html网页中,一打开网页,需要用鼠标点击一下flash才能激活它,然后才能用键盘操作Flash游戏了,不知道有没有什么办法不用鼠标点击,在打开网页的时候就直接能操作flash游戏了.

------解决方案--------------------
FLASH没有激活,按下面方式插入FLASH就可以了:
参考:
test.htm
<script type= "text/javascript ">
var flashURL= "http://zi.csdn.net/2007.06/chuanzhiboke585X60.swf?clickTAG=http://z.csdn.net/gmclick.php%3Fbannerid=1045%26zoneid=183%26source=%26dest=http%3A%2F%2Fevents.csdn.net%2Fczbk%2Fjava%2F ";
var flashWIDTH= "1280 ";
var flashHEIGHT= "230 ";
</script>
<script type= "text/javascript " src= "flash_view.js "> </script>

flash_view.js
document.writeln ( ' <OBJECT classid= "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 " codebase= "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0 " WIDTH= '+flashWIDTH+ ' HEIGHT= '+flashHEIGHT+ '> ');
document.writeln ( ' <PARAM NAME=movie VALUE= " '+flashURL+ ' "> ');
document.writeln ( ' <PARAM NAME=wmode VALUE=transparent> ');
document.writeln ( ' <PARAM NAME=loop VALUE=true> ');
document.writeln ( ' <PARAM NAME=quality VALUE=high> ');
document.writeln ( ' <EMBED src= " '+flashURL+ ' " loop=true wmode=opaque quality=high swLiveConnect=FALSE WIDTH= '+flashWIDTH+ ' HEIGHT= '+flashHEIGHT+ ' TYPE= "application/x-shockwave-flash " PLUGINSPAGE= "http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash "> </EMBED> ');
document.writeln ( ' </OBJECT> ');
------解决方案--------------------
up
------解决方案--------------------
up
------解决方案--------------------
帮顶
------解决方案--------------------
flash全屏显示,哈
------解决方案--------------------
function flash(string)
{
document.write(string);
}
<script> flash( ' <embed src=flash/zy.swf quality=high type=application/x-shockwave-flash width=150 height=40 wmode=transparent> </embed> ') </script>
------解决方案--------------------
onload= "document.getElementById( 'FlashID ').focus(); "