页面嵌入Flash后用FlashVars的参数值不同改变Flash视频地址
用swfobject.js嵌入Flash播放器
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
var flashvars =
{
'url': 'http://abcd.com/vido/3434',
'image': '/player/preview.jpg',
'id': 'playerID',
'autostart': 'true'
};
var params =
{
'allowfullscreen': 'true',
'allowscriptaccess': 'always',
'bgcolor': '#000000',
'quality':'high',
'wmode': 'opaque',
'provider': 'pseudo'
};
var attributes =
{
'align': 'top',
'name': 'playerID',
'id': 'playerID'
};
swfobject.embedSWF('player.swf', 'video', '390', '297', '9.0.124', 'expressInstall.swf', flashvars, params, attributes);
</script>
</head>
<body>
<form id="form1" runat="server">
<div style="width: 390px; height: 297px;" id="video"></div>
</form>
</body>
</html>
<object name="playerID" width="390" height="297" align="top" id="playerID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
<PARAM NAME="_cx" VALUE="10318">
<PARAM NAME="_cy" VALUE="7858">
<PARAM NAME="FlashVars" VALUE="url=http://abcd.com/vido/3434&image=/player/preview.jpg&id=playerID&autostart=true">
<PARAM NAME="Movie" VALUE="player.swf">
<PARAM NAME="Src" VALUE="player.swf">
<PARAM NAME="WMode" VALUE="Opaque">
<PARAM NAME="Play" VALUE="0">
<PARAM NAME="Loop" VALUE="-1">
<PARAM NAME="Quality" VALUE="High">
<PARAM NAME="SAlign" VALUE="LT">
<PARAM NAME="Menu" VALUE="-1">
<PARAM NAME="Base" VALUE="">
<PARAM NAME="AllowScriptAccess" VALUE="always">
<PARAM NAME="Scale" VALUE="NoScale">
<PARAM NAME="DeviceFont" VALUE="0">
<PARAM NAME="EmbedMovie" VALUE="0">
<PARAM NAME="BGColor" VALUE="000000">
<PARAM NAME="SWRemote" VALUE="">
<PARAM NAME="MovieData" VALUE="">
<PARAM NAME="SeamlessTabbing" VALUE="1">
<PARAM NAME="Profile" VALUE="0">
<PARAM NAME="ProfileAddress" VALUE="">
<PARAM NAME="ProfilePort" VALUE="0">
<PARAM NAME="AllowNetworking" VALUE="all">
<PARAM NAME="AllowFullScreen" VALUE="true">
<PARAM NAME="AllowFullScreenInteractive" VALUE="">
<PARAM NAME="IsDependent" VALUE="0">
<param name="allowfullscreen" value="true">
<param name="allowscriptaccess" value="always">
<param name="bgcolor" value="#000000">
<param name="quality" value="high">
<param name="wmode" value="opaque">
<param name="provider" value="pseudo">
<param name="flashvars" value="url=/vido/3434&image=/player/preview.jpg&id=playerID&autostart=true">
<param name="movie" value="player.swf">
</object>