JavaScriptでflashを生成する方法
3101 ワード
/*
BCASTR.SWF flash , flash
, , ,XML URL, divId
*/
function flashBcastrXML(path, width, height, xmlUrl, divId){
var flashObject = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id=scriptmain name=scriptmain codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+width+'" height="'+height+'">';
flashObject = flashObject + ' <param name="movie" value="'+path+'/images/market.swf?bcastr_xml_url='+xmlUrl+'">';
flashObject = flashObject + '<param name="quality" value="high">';
flashObject = flashObject + '<param name=scale value=noscale>';
flashObject = flashObject + '<param name="LOOP" value="false">';
flashObject = flashObject + '<param name="menu" value="false">';
flashObject = flashObject + '<param name="wmode" value="transparent">';
flashObject = flashObject + '<embed src="'+path+'/images/bcastr.swf?bcastr_xml_url='+xmlUrl+'" width="'+width+'" height="'+height+'" loop="false" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" salign="T" name="scriptmain" menu="false" wmode="transparent"></embed>';
flashObject = flashObject + '</object>';
jQuery('#' + divId).html(flashObject);
}
/*
FLASH DIV
, , ,XML URL, divId
*/
function flash4Div(path, width, height, divId){
var flashObject = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="' + width + '" height="' + height + '">';
flashObject = flashObject + '<param name="movie" value="' + path + '">';
flashObject = flashObject + '<param name="quality" value="high">';
flashObject = flashObject + '<param name="bgcolor" value="#FFFFFF">';
flashObject = flashObject + '<param name="menu" value="false"><param name=wmode value="opaque">';
flashObject = flashObject + '<embed src="' + path + '" wmode="opaque" bgcolor="#FFFFFF" quality="high" width="' + width + '" height="' + height + '" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
flashObject = flashObject + '</object>';
jQuery('#' + divId).html(flashObject);
}