新天下 FLASH 游戏_增加玩家自定FLASH缩放显示功能
修改對應版本 : 別問我是誰 版本 新天下 FLASH 遊戲本修改在 Discuz!5.0.0 / Discuz!5.5.0 / Discuz!6.0.0 / Discuz!7.0.0 上測試過
修改檔案 : /plugins/nkflash.php
新增檔案 : /images/nkflash/zoom_in.gif
/images/nkflash/zoom_out.gif
/images/nkflash/zoom_100.gif
/images/nkflash/reload.gif
/images/nkflash/zoom.js
(1)
修改前備份原有檔案 nkflash.php
(2)
/plugins/nkflash.php 找 :
ECHO "<p align=\"center\"><object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" width=\"$gamelist\" height=\"$gamelist\" id=\"$gamelist\" align=\"middle\"><param name=\"allowScriptAccess\" value=\"sameDomain\">\n";
ECHO "<param name=\"movie\" value=\"$gamelist\"><param name=\"loop\" value=\"false\">$FlashVars<param name=\"menu\" value=\"false\"><param name=\"quality\" value=\"high\">\n";
ECHO "<param name=\"scale\" value=\"noborder\"><param name=\"devicefont\" value=\"true\"><param name=\"bgcolor\" value=\"$gamelist\">\n";
ECHO "<embed src=\"$gamelist\" loop=\"false\" $Flashpaths menu=\"false\" quality=\"high\" scale=\"noborder\" devicefont=\"true\" bgcolor=\"$gamelist\" width=\"$gamelist\" height=\"$gamelist\" name=\"$gamelist\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"></object></p>\n";
替換為 :
ECHO "<p align=\"center\"><script language=\"javascript\" src=\"images/nkflash/zoom.js\"></script><img src=\"images/nkflash/zoom_in.gif\" title=\"放大\" onclick=\"javascript:zoom(1.1);return false;\" style=\"cursor:hand; cursor:pointer\"><img src=\"images/nkflash/zoom_out.gif\" title=\"縮小\" onclick=\"javascript:zoom(0.9);return false;\" style=\"cursor:pointer\"><img src=\"images/nkflash/zoom_100.gif\" title=\"原始大小\" onclick=\"javascript:document.getElementById('zoom').style.width='$gamelistpx';document.getElementById('zoom').style.height='$gamelistpx'; return false;\" style=\"cursor:pointer\"><img src=\"images/nkflash/reload.gif\" title=\"重新整理\" onclick=\"javascript:history.go(0)\" style=\"cursor:pointer\"><br><br><div id=\"zoom\" style=width:$gamelistpx;height:$gamelistpx;><object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" width=\"100%\" height=\"100%\" id=\"$gamelist\" align=\"middle\"><param name=\"allowScriptAccess\" value=\"sameDomain\">\n";
ECHO "<param name=\"movie\" value=\"$gamelist\"><param name=\"loop\" value=\"false\">$FlashVars<param name=\"menu\" value=\"false\"><param name=\"quality\" value=\"high\">\n";
ECHO "<param name=\"scale\" value=\"noborder\"><param name=\"devicefont\" value=\"true\"><param name=\"bgcolor\" value=\"$gamelist\">\n";
ECHO "<embed src=\"$gamelist\" loop=\"false\" $Flashpaths menu=\"false\" quality=\"high\" scale=\"noborder\" devicefont=\"true\" bgcolor=\"$gamelist\" width=\"100%\" height=\"100%\" name=\"$gamelist\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"></object></div></p>\n";
nkflash.php 修改保存後上傳回 /plugins/ 資料夾
(3)
下載附件 : nkflash_zoom_hack.zip 解壓
新增檔案 : zoom_in.gif, zoom_out.gif, zoom_100.gif, reload.gif, zoom.js
上傳至 /images/nkflash/ 資料夾
--------------------------
若想按鈕及遊戲 可全部置中
找
ECHO "<p align=\"center\"><script language=\"javascript\" src=\"images/nkflash/zoom.js\"></script><img src=\"images/nkflash/zoom_in.gif\" title=\"放大\" onclick=\"javascript:zoom(1.1);return false;\" style=\"cursor:hand; cursor:pointer\"><img src=\"images/nkflash/zoom_out.gif\" title=\"縮小\" onclick=\"javascript:zoom(0.9);return false;\" style=\"cursor:pointer\"><img src=\"images/nkflash/zoom_100.gif\" title=\"原始大小\" onclick=\"javascript:document.getElementById('zoom').style.width='$gamelistpx';document.getElementById('zoom').style.height='$gamelistpx'; return false;\" style=\"cursor:pointer\"><img src=\"images/nkflash/reload.gif\" title=\"重新整理\" onclick=\"javascript:history.go(0)\" style=\"cursor:pointer\"><br><br><div id=\"zoom\" style=width:$gamelistpx;height:$gamelistpx;><object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" width=\"100%\" height=\"100%\" id=\"$gamelist\" align=\"middle\"><param name=\"allowScriptAccess\" value=\"sameDomain\">\n";
ECHO "<param name=\"movie\" value=\"$gamelist\"><param name=\"loop\" value=\"false\">$FlashVars<param name=\"menu\" value=\"false\"><param name=\"quality\" value=\"high\">\n";
ECHO "<param name=\"scale\" value=\"noborder\"><param name=\"devicefont\" value=\"true\"><param name=\"bgcolor\" value=\"$gamelist\">\n";
ECHO "<embed src=\"$gamelist\" loop=\"false\" $Flashpaths menu=\"false\" quality=\"high\" scale=\"noborder\" devicefont=\"true\" bgcolor=\"$gamelist\" width=\"100%\" height=\"100%\" name=\"$gamelist\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"></object></div></p>\n";
改為以下
ECHO "<script language=\"javascript\" src=\"images/nkflash/zoom.js\"></script><table align=\"center\"><tr><td align=\"center\"><img src=\"images/nkflash/zoom_in.gif\" title=\"放大\" onclick=\"javascript:zoom(1.1);return false;\" style=\"cursor:hand; cursor:pointer\"> <img src=\"images/nkflash/zoom_out.gif\" title=\"縮小\" onclick=\"javascript:zoom(0.9);return false;\" style=\"cursor:pointer\"> <img src=\"images/nkflash/zoom_100.gif\" title=\"原始大小\" onclick=\"javascript:document.getElementById('zoom').style.width='$gamelistpx';document.getElementById('zoom').style.height='$gamelistpx'; return false;\" style=\"cursor:pointer\"> <img src=\"images/nkflash/reload.gif\" title=\"重新整理\" onclick=\"javascript:history.go(0)\" style=\"cursor:pointer\"><br><br><br><br><div id=\"zoom\" style=\"width:$gamelistpx;height:$gamelistpx;\"><object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" width=\"100%\" height=\"100%\" id=\"$gamelist\" align=\"middle\"><param name=\"allowScriptAccess\" value=\"sameDomain\">\n";
ECHO "<param name=\"movie\" value=\"$gamelist\"><param name=\"loop\" value=\"false\">$FlashVars<param name=\"menu\" value=\"false\"><param name=\"quality\" value=\"high\">\n";
ECHO "<param name=\"scale\" value=\"noborder\"><param name=\"devicefont\" value=\"true\"><param name=\"bgcolor\" value=\"$gamelist\">\n";
ECHO "<embed src=\"$gamelist\" loop=\"false\" $Flashpaths menu=\"false\" quality=\"high\" scale=\"noborder\" devicefont=\"true\" bgcolor=\"$gamelist\" width=\"100%\" height=\"100%\" name=\"$gamelist\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"></object></div></td></tr></table>\n";
----------------
若想將按鈕 放在右上方 改為以下
ECHO "<script language=\"javascript\" src=\"images/nkflash/zoom.js\"></script><table align=\"center\"><tr><td align=\"center\"><div id=\"zoom\" style=\"width:$gamelistpx;height:$gamelistpx;\"><object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" width=\"100%\" height=\"100%\" id=\"$gamelist\" align=\"middle\"><param name=\"allowScriptAccess\" value=\"sameDomain\">\n";
ECHO "<param name=\"movie\" value=\"$gamelist\"><param name=\"loop\" value=\"false\">$FlashVars<param name=\"menu\" value=\"false\"><param name=\"quality\" value=\"high\">\n";
ECHO "<param name=\"scale\" value=\"noborder\"><param name=\"devicefont\" value=\"true\"><param name=\"bgcolor\" value=\"$gamelist\">\n";
ECHO "<embed src=\"$gamelist\" loop=\"false\" $Flashpaths menu=\"false\" quality=\"high\" scale=\"noborder\" devicefont=\"true\" bgcolor=\"$gamelist\" width=\"100%\" height=\"100%\" name=\"$gamelist\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"></object></div></td><td valign=\"top\" align=\"right\" width=\"22\"><img src=\"images/nkflash/1x1.gif\" height=\"5\"><br><img src=\"images/nkflash/zoom_in.gif\" title=\"放大\" onclick=\"javascript:zoom(1.1);return false;\" style=\"cursor:hand; cursor:pointer\"><br><br><img src=\"images/nkflash/zoom_out.gif\" title=\"縮小\" onclick=\"javascript:zoom(0.9);return false;\" style=\"cursor:pointer\"><br><br><img src=\"images/nkflash/zoom_100.gif\" title=\"原始大小\" onclick=\"javascript:document.getElementById('zoom').style.width='$gamelistpx';document.getElementById('zoom').style.height='$gamelistpx'; return false;\" style=\"cursor:pointer\"><br><br><img src=\"images/nkflash/reload.gif\" title=\"重新整理\" onclick=\"javascript:history.go(0)\" style=\"cursor:pointer\"></td></tr></table>\n";
页:
[1]