<Head>
<Script language = "JavaScript" type = "text/JavaScript" src = "JS/flash. js"> </SCRIPT>
</Head>
Call scripts
<Body>
<Script language = "JavaScript" type = "text/JavaScript">
Writeflashhtml ("_ SWF = Flash/cehuawang.swf", "_ width = 792", "_ Height = 80", "_ wmode = transparent ");
</SCRIPT>
</Body>
// Flash. js file code
Function writeflashhtml (ARG)
{
VaR parm = []
VaR _ default_version = "8, 0, 24, 0 ";
VaR _ default_quality = "high ";
VaR _ default_align = "Middle ";
VaR _ default_menu = "false ";
For (I = 0; I <arguments. length; I ++)
{
Parm [I] = arguments [I]. Split (''). Join (''). Split ('= ')
For (var j = parm [I]. Length-1; j> 1; j --){
Parm [I] [J-1] + = "=" + parm [I]. Pop ();
}
Switch (parm [I] [0])
{
Case '_ version': VaR _ version = parm [I] [1]; break;
Case '_ SWF': VaR _ SWF = parm [I] [1]; break;
Case '_ base': VaR _ base = parm [I] [1]; break;
Case '_ quality': VaR _ Quality = parm [I] [1]; break;
Case '_ loop': VaR _ loop = parm [I] [1]; break;
Case '_ bgcolor': VaR _ bgcolor = parm [I] [1]; break;
Case '_ wmode': VaR _ wmode = parm [I] [1]; break;
Case '_ play': VaR _ play = parm [I] [1]; break;
Case '_ menu': VaR _ menu = parm [I] [1]; break;
Case '_ scale': VaR _ scale = parm [I] [1]; break;
Case '_ salign': VaR _ salign = parm [I] [1]; break;
Case '_ height': VaR _ Height = parm [I] [1]; break;
Case '_ width': VaR _ width = parm [I] [1]; break;
Case '_ hspace': VaR _ hspace = parm [I] [1]; break;
Case '_ vspace': VaR _ vspace = parm [I] [1]; break;
Case '_ align': VaR _ align = parm [I] [1]; break;
Case '_ class': VaR _ class = parm [I] [1]; break;
Case '_ id': VaR _ id = parm [I] [1]; break;
Case '_ name': VaR _ name = parm [I] [1]; break;
Case '_ style': VaR _ style = parm [I] [1]; break;
Case '_ declare': VaR _ declare = parm [I] [1]; break;
Case '_ flashvars': VaR _ flashvars = parm [I] [1]; break;
Default :;
}
}
VaR thtml = ""
Thtml + = "<object classid = 'clsid: d27cdb6e-ae6d-11cf-96b8-444553540000 'codebase = 'HTTP: // download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab?version=" + (_ version )? _ Version: _ default_version) + "'"
If (_ width) thtml + = "width = '" + _ width + "'"
If (_ height) thtml + = "Height = '" + _ height + "'"
If (_ heat Ace) thtml + = "heat ACE = '" + _ heat ACE + "'"
If (_ vspace) thtml + = "vspace = '" + _ vspace + "'"
If (_ align) thtml + = "align = '" + _ align + "'"
Else thtml + = "align = '" + _ default_align + "'"
If (_ class) thtml + = "class = '" + _ class + "'"
If (_ id) thtml + = "id = '" + _ ID + "'"
If (_ name) thtml + = "name = '" + _ name + "'"
If (_ style) thtml + = "style = '" + _ style + "'"
If (_ declare) thtml + = "" + _ declare
Thtml + = ">"
If (_ SWF) thtml + = "<Param name = 'movi' value = '" + _ SWF + "'>"
If (_ quality) thtml + = "<Param name = 'quality' value = '" + _ quality + "'>"
Else thtml + = "<Param name = 'quality 'value ='" + _ default_quality + "'>"
If (_ loop) thtml + = "<Param name = 'loop 'value = '" + _ loop + "'>"
If (_ bgcolor) thtml + = "<Param name = 'bgcolor' value = '" + _ bgcolor + "'>"
If (_ Play) thtml + = "<Param name = 'play' value = '" + _ Play + "'>"
If (_ menu) thtml + = "<Param name = 'menu 'value = '" + _ menu + "'>"
Else thtml + = "<Param name = 'menu 'value = '" + _ default_menu + "'>"
If (_ scale) thtml + = "<Param name = 'Scale' value = '" + _ scale + "'>"
If (_ salign) thtml + = "<Param name = 'salign 'value = '" + _ salign + "'>"
If (_ wmode) thtml + = "<Param name = 'wmode' value = '" + _ wmode + "'>"
If (_ base) thtml + = "<Param name = 'base' value = '" + _ base + "'>"
If (_ flashvars) thtml + = "<Param name = 'flashvars' value = '" + _ flashvars + "'>"
Thtml + = "<embed pluginspage = 'HTTP: // www.macromedia.com/go/getflashplayer '"
If (_ width) thtml + = "width = '" + _ width + "'"
If (_ height) thtml + = "Height = '" + _ height + "'"
If (_ heat Ace) thtml + = "heat ACE = '" + _ heat ACE + "'"
If (_ vspace) thtml + = "vspace = '" + _ vspace + "'"
If (_ align) thtml + = "align = '" + _ align + "'"
Else thtml + = "align = '" + _ default_align + "'"
If (_ class) thtml + = "class = '" + _ class + "'"
If (_ id) thtml + = "id = '" + _ ID + "'"
If (_ name) thtml + = "name = '" + _ name + "'"
If (_ style) thtml + = "style = '" + _ style + "'"
Thtml + = "type = 'application/X-Shockwave-flash '"
If (_ declare) thtml + = "" + _ declare
If (_ SWF) thtml + = "src = '" + _ SWF + "'"
If (_ quality) thtml + = "Quality = '" + _ quality + "'"
Else thtml + = "Quality = '" + _ default_quality + "'"
If (_ loop) thtml + = "loop = '" + _ loop + "'"
If (_ bgcolor) thtml + = "bgcolor = '" + _ bgcolor + "'"
If (_ Play) thtml + = "play = '" + _ Play + "'"
If (_ menu) thtml + = "menu = '" + _ menu + "'"
Else thtml + = "menu = '" + _ default_menu + "'"
If (_ scale) thtml + = "scale = '" + _ scale + "'"
If (_ salign) thtml + = "salign = '" + _ salign + "'"
If (_ wmode) thtml + = "wmode = '" + _ wmode + "'"
If (_ base) thtml + = "base = '" + _ base + "'"
If (_ flashvars) thtml + = "flashvars = '" + _ flashvars + "'"
Thtml + = "> </embed>"
Thtml + = "</Object>"
Document. Write (thtml)
}
// Code ended