将一个flash插入网页,或是在一个网页上放入一个在线视频,通常情况下,会出现当鼠标经过时,那个插件会抖动一下,并且有提示说,请点击激活该控件,因为有的浏览器上有,有的可能没有。一直我以为都是浏览器本身的问题,这两天一搞,别人硬要我变为没有提示,不准有框。
我很郁闷,最后他给出源码。
附下:
别人的
function Flash(src,width,height)
{
var banner;
banner="<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width=""+width+"" height=""+height+"">";
banner+=" <param movie" value=""+src+"" />";
banner+="<param quality" value="high" />";
banner+="<embed src=""+src+"" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width=""+width+"" height=""+height+""></embed>";
banner+="</object>";
document.write(banner);
}
调用时,
<SCRIPT language="javascript"></script>
<script>
Flash("default.swf",700,300)
</script>
以下是我自己的,
function wmv(src)
{
wmv="<object classid="clsid:05589FA1-C356-11CE-BF01-00AA0055595A" ActiveMovie1" width="350" height="380" >";
wmv+="<param Appearance" value="0" />";
wmv+="<param AutoStart" value="-1" />";
wmv+="<param AllowChangeDisplayMode" value="-1" />";
wmv+="<param AllowHideDisplay" value="0" />";
wmv+="<param AllowHideControls" value="-1" />";
wmv+="<param AutoRewind" value="-1" />";
wmv+="<param Balance" value="0" />";
wmv+="<param CurrentPosition" value="0" />";
wmv+="<param DisplayBackColor" value="0" />";
wmv+="<param DisplayForeColor" value="16777215" />";
wmv+="<param DisplayMode" value="0" />";
wmv+="<param Enabled" value="-1" />";
wmv+="<param EnableContextMenu" value="-1" />";
wmv+="<param EnablePositionControls" value="-1" />";
wmv+="<param EnableSelectionControls" value="0" />";
wmv+="<param EnableTracker" value="-1" />";
wmv+="<param Filename" value="download\"+src+"" valuetype="wmv" />";
wmv+="<param FullScreenMode" value="0" />";
wmv+="<param MovieWindowSize" value="0" />";
wmv+="<param PlayCount" value="1" />";
wmv+="<param Rate" value="1" />";
wmv+="<param SelectionStart" value="-1" />";
wmv+="<param SelectionEnd" value="-1" />";
wmv+="<param ShowControls" value="-1" />";
wmv+="<param ShowDisplay" value="-1" />";
wmv+="<param ShowPositionControls" value="0" />";
wmv+="<param ShowTracker" value="-1" />";
wmv+="<param Volume" value="-480" />";
wmv+="</object>";
document.write(wmv);
}
调用时:
<script language="javascript"></script>
<script>
wmv("<%=request("video_name")%>")
</script>