为了最近在做的漫天糖小游戏站找到的备用

Nov 10th, 2008
0

Comments

flash游戏站最常见的
键盘如方向键控制时
控制的可能是网页而不是flash
下面发的东西,可以让flash全屏游戏,可在flash前加入JS广告。
防17173
测试能用
准备2个JS
第一个,控制广告和游戏的顺序,广告在游戏前还后。


var playShow = "1";
function flashStart(srctime){
if (playShow=="1")
{
showPlay();
setTimeout('setFlash()',srctime*1000);
}
else
{
setFlash();
}
}
function showPlay()
{
document.write("");
}
function setFlash()
{
str = " str += "codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\""+w+"\" height=\""+h+"\">";
str += " ";

str += " \n";
str += " str += "height='"+h+"' width='"+w+"' TYPE=application/x-shockwave-flash PLUGINSPAGE=http://www.macromedia.com/shockwave/download/index.cgi?P1_Pro d_Version=ShockwaveFlash type='application/x-shockwave-flash'>";
str += "

";
document.getElementById(flashid).innerHTML = str;
}
function PlayInFull(flashUrl) {
window.open("http://放全屏游戏页的路径/playinfull.htm?"+flashUrl,"qqhhy","fullscreen");
window.close()
}

广告的JS自己看着办吧
给个参考,如广告为播放flash


flashLog = "gamead.swf";
logw = "600";
logh = "400";
document.write (" document.write ("codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\""+logw+"\" height=\""+logh+"\">\n");
document.write (" \n");
document.write (" \n");
document.write (" document.write ("height='"+logh+"' width='"+logw+"' TYPE=application/x-shockwave-flash PLUGINSPAGE=http://www.macromedia.com/shockwave/download/index.cgi?P1_Pro d_Version=ShockwaveFlash type='application/x-shockwave-flash'>\n");
document.write ("
\n");

下面是那个全屏游戏页面代码playinfull.htm






站点名称【*******.COM】全屏游戏




最后,模板里面需要放的


[全屏玩游戏] [再玩一次]