⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 flash.htm

📁 生成html的ASP企业站点,可以进行二次开发的
💻 HTM
📖 第 1 页 / 共 2 页
字号:
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script type="text/javascript" src="dialog.js"></script>

<script type="text/javascript">
document.write ("<link href='../skin/" + config.Skin + "/dialog.css' type='text/css' rel='stylesheet'>");

var sAction = "INSERT";
var sTitle = lang["DlgComInsert"];

var oControl;
var oSeletion;
var sRangeType;

var sFromUrl = "http://";
var sWidth = "200";
var sHeight = "200";
var sAlign = "";
var sVSpace = "";
var sHSpace = "";
var sLoop = "true";
var sPlay = "true";
var sBgColor = "";
var sScale = "";
var sQuality = "high";
var sMenu = "";
var sWmode = "";
var sFlashVars = "";

var sCheckFlag = "file";
var oParam = new Object;

var bAllowUpload = ((parseFloat(config.AllowFlashSize)>0) ? true : false);

oSelection = dialogArguments.eWebEditor.document.selection.createRange();
sRangeType = dialogArguments.eWebEditor.document.selection.type;

if (sRangeType == "Control") {
	oControl = oSelection.item(0);

	if ((oControl.tagName == "OBJECT")&&(oControl.getAttribute("classid",2).toLowerCase()=="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000")){
		sAction = "MODI";
		var o_Embed = oControl.getElementsByTagName("EMBED");
		if (o_Embed){
			oControl = o_Embed;
		}
	//}else if ((oControl.tagName == "EMBED")&&(oControl.getAttribute("type",2).toLowerCase()=="application/x-shockwave-flash")){
	}else if (oControl.tagName == "EMBED"){
		var o_EmbedType = oControl.attributes["type"];
		if (o_EmbedType && o_EmbedType.nodeValue == 'application/x-shockwave-flash' ){
			sAction = "MODI";
		}
	}


	if (sAction=="MODI"){
		sTitle = lang["DlgComModify"];
		sCheckFlag = "url";


		if (oControl.tagName=="OBJECT"){

			sAlign = oControl.align;
			sWidth = oControl.width;
			sHeight = oControl.height;
			sVSpace = oControl.vspace;
			sHSpace = oControl.hspace;

			initParamObj(oControl.innerHTML);
			sFromUrl = getParamValue("movie");
			sLoop = getParamValue("loop");
			if (sLoop=="-1"){
				sLoop = "true";
			}else if (sLoop=="0"){
				sLoop = "false";
			}else{
				sLoop = "";
			}

			sPlay = getParamValue("play");
			if (sPlay=="-1"){
				sPlay = "true";
			}else if (sPlay=="0"){
				sPlay = "false";
			}else{
				sPlay = "";
			}

			sBgColor = getParamValue("bgcolor");
			sScale = getParamValue("scale");
			sQuality = getParamValue("quality");
			sMenu = getParamValue("menu");
			sWmode = getParamValue("wmode");
			sFlashVars = getParamValue("flashvars");

		}else{

			sAlign = get_Attribute(oControl, "align");
			sWidth = get_Attribute(oControl, "width");
			sHeight = get_Attribute(oControl, "height");
			sVSpace = get_Attribute(oControl, "vspace");
			sHSpace = get_Attribute(oControl, "hspace");


			sFromUrl = get_Attribute(oControl, "src");
			sLoop = get_Attribute(oControl, "loop");
			sPlay = get_Attribute(oControl, "play");

			sBgColor = get_Attribute(oControl, "bgcolor");
			sScale = get_Attribute(oControl, "scale");
			sQuality = get_Attribute(oControl, "quality");
			sMenu = get_Attribute(oControl, "menu");
			sWmode = get_Attribute(oControl, "wmode");
			sFlashVars = get_Attribute(oControl, "flashvars");

		}
	}


}


document.write("<title>" + lang["DlgFlash"] + "(" + sTitle + ")</title>");


function get_Attribute(obj, s_Name){
	var o = obj.attributes[s_Name];
	if (o){
		if (o.nodeValue){
			return o.nodeValue;
		}else{
			return "";
		}
	}else{
		return "";
	}
}

function InitDocument(){
	lang.TranslatePage(document);

	SearchSelectValue(d_align, sAlign.toLowerCase());
	SearchSelectValue(d_loop, sLoop.toLowerCase());
	SearchSelectValue(d_play, sPlay.toLowerCase());
	SearchSelectValue(d_scale, sScale.toLowerCase());
	SearchSelectValue(d_quality, sQuality.toLowerCase());
	SearchSelectValue(d_menu, sMenu.toLowerCase());
	SearchSelectValue(d_wmode, sWmode.toLowerCase());
	
	if (!bAllowUpload){
		sCheckFlag = "url";
	}
	RadioClick(sCheckFlag);

	d_fromurl.value = sFromUrl;
	d_bgcolor.value = sBgColor;
	s_bgcolor.style.backgroundColor = sBgColor;
	d_width.value = sWidth;
	d_height.value = sHeight;
	d_vspace.value = sVSpace;
	d_hspace.value = sHSpace;
	d_flashvars.value = sFlashVars;
	
	doPreview();
	
	adjustDialog();
}

function initParamObj(html){
	var re = new RegExp("<param name=[\'\"]([a-zA-Z].*?)[\'\"] value=[\'\"](.*?)[\'\"]>","gi");
	while((arr = re.exec(html))!=null){
		oParam[RegExp.$1.toLowerCase()] = RegExp.$2;
	}
}

function getParamValue(s_Key){
	return (oParam[s_Key]) ? oParam[s_Key] : "";
}



function RadioClick(what){
	if (what=="url"){
		d_fromurl.disabled=false;
		if (config.AllowBrowse=="1"){
			d_browse.disabled=false;
		}
		d_checkfromurl.checked=true;
		if (bAllowUpload){
			d_checkfromfile.checked=false;
			document.myuploadform.uploadfile.disabled=true;
		}
	}else{
		d_checkfromurl.checked=false;
		document.myuploadform.uploadfile.disabled=false;
		d_checkfromfile.checked=true;
		d_fromurl.disabled=true;
		if (config.AllowBrowse=="1"){
			d_browse.disabled=true;
		}
	}
}


function UploadError(s_Flag){
	AbleItems();
	RadioClick('file');
	divProcessing.style.display="none";
	try {
		BaseAlert(document.myuploadform.uploadfile, getUploadErrDesc(s_Flag, config.AllowFlashExt, config.AllowFlashSize));
	}
	catch(e){}
}


function UploadSaved(sPathFileName){
	d_fromurl.value = sPathFileName;
	ReturnValue();
}


function ReturnValue(){
	sFromUrl = d_fromurl.value;
	sBgColor = d_bgcolor.value;
	sAlign = d_align.value;
	sWidth = d_width.value;
	sHeight = d_height.value;
	sVSpace = d_vspace.value;
	sHSpace = d_hspace.value;
	sLoop = d_loop.value;
	sPlay = d_play.value;
	sScale = d_scale.value;
	sQuality = d_quality.value;
	sMenu = d_menu.value;
	sWmode = d_wmode.value;
	sFlashVars = d_flashvars.value;


	var html = "<embed type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"";

	if (sAlign!=""){
		html += " align=\""+sAlign+"\"";
	}
	if (sWidth!=""){
		html += " width=\""+sWidth+"\"";
	}
	if (sHeight!=""){
		html += " height=\""+sHeight+"\"";
	}
	if (sVSpace!=""){
		html += " vspace=\""+sVSpace+"\"";
	}
	if (sHSpace!=""){
		html += " hspace=\""+sHSpace+"\"";
	}

	html += " src=\""+sFromUrl+"\"";

	if (sBgColor != ""){
		html += " bgcolor=\""+sBgColor+"\"";
	}
	if (sLoop != ""){
		html += " loop=\""+sLoop+"\"";
	}
	if (sPlay != ""){
		html += " play=\""+sPlay+"\"";
	}

	if (sScale != ""){
		html += " scale=\""+sScale+"\"";
	}
	if (sQuality != ""){
		html += " quality=\""+sQuality+"\"";
	}
	if (sMenu != ""){
		html += " menu=\""+sMenu+"\"";
	}
	if (sWmode != ""){
		html += " wmode=\""+sWmode+"\"";
	}
	if (sFlashVars != ""){
		html += " flashvars=\""+sFlashVars+"\"";
	}

	html += "></embed>";

	dialogArguments.insertHTML(html);

	window.returnValue = null;
	window.close();
}


function ok(){
	d_width.value = ToInt(d_width.value);
	d_height.value = ToInt(d_height.value);
	d_vspace.value = ToInt(d_vspace.value);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -