﻿//FLASH播放javascript

function getPlay(setUrl,setWidth,setHeight){

    var strText = "<object title=\"原色视觉\" align=\"middle\" classid=\"CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95\" class=\"object\" id=\"MediaPlayer\" width=" + setWidth + " height=" + setHeight + ">";
		strText = strText+"<param name=\"AUTOSTART\" value=\"true\"/>";
		strText = strText+"<param name=\"ShowStatusBar\" value=\"-1\"/>";
		strText = strText+"<param name=\"Filename\" value="+setUrl+">";
		strText = strText+"<param name=\"DisplaySize\" value=\"0\"> ";
		strText = strText+"<embed title=\"原色视觉\" type=\"application/x-oleobject\" codebase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701\" flename=\"mp\" src="+setUrl+" >";
		strText = strText+"</embed>";
		strText = strText+"</object>";
		return strText;
}

function getFlv(w,h,t,f){
	var swf_width=w //445
	var swf_height=h //301
	var texts=t //'男左女右'
	var files=f//'http://www.yxgz.cn/Files/adminFiles/jzt/ok2_3.flv'
	
	//var files='http://www.ruochi.com/product/vcastr/flv/happy_feet.flv|http://www.transformersmovie.com/transformers_640.flv|http://www.ruochi.com/product/vcastr/flv/江南.flv|http://www.ruochi.com/product/vcastr/flv/晚安部落.flv'
	var strText = "";
	
	strText = strText+'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"';
	strText = strText+'codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ swf_width +'" height="'+swf_height +'">';
	strText = strText + '<param name="movie" value="/Images/Play.swf"><param name="quality" value="high">';
	strText = strText+'<param name="menu" value="false"><param name="allowFullScreen" value="true" />';
	strText = strText+'<param name="FlashVars" value="vcastr_file='+files+'&vcastr_title='+texts+'&IsAutoPlay=1&IsContinue=1">';
	strText = strText+'<embed src="/Images/Play.swf" allowFullScreen="true" FlashVars="vcastr_file='+files+'&vcastr_title='+texts+'&IsAutoPlay=1&IsContinue=1"';
	strText = strText+' menu="false" quality="high" width="'+ swf_width +'" height="'+ swf_height +'" type="application/x-shockwave-flash"';
	strText = strText+' pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>';
	
	return strText;
}
