📄 24.11.htm
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Cross-browser Flash Control Example </title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script type="text/javascript">
<!--
var dataReady = false;
var pluginAvailable = false;
function detectPlugin()
{
if (navigator.plugins &&
((navigator.plugins["Shockwave Flash"] &&
navigator.plugins["Shockwave Flash"]["application/x-shockwave-flash"])
||
(navigator.plugins["Shockwave Flash 2.0"] &&
navigator.plugins["Shockwave Flash 2.0"]["application/x-shockwave-flash"])
))
pluginAvailable = true;
return(pluginAvailable);
}
function changeFrame(i)
{
if (!dataReady)
return;
// Some versions of the ActiveX control don't support TotalFrames,
// so the check is omitted here. However, the control handles values
// out of range gracefully.
document.demo.GotoFrame(parseInt(i));
}
function play()
{
if (!dataReady)
return;
if (!document.demo.IsPlaying())
document.demo.Play();
}
function stop()
{
if (!dataReady)
return;
if (document.demo.IsPlaying())
document.demo.StopPlay();
}
function rewind()
{
if (!dataReady)
return;
if (document.demo.IsPlaying())
document.demo.StopPlay();
document.demo.Rewind();
}
function zoom(percent)
{
if (!dataReady)
return;
if (percent> 0)
document.demo.Zoom(parseInt(percent));
}
//-->
</script>
</head>
<body onload="dataReady = true;">
<h2>Flash 播放控制器(ActiveX)</h2><p>
<object id="demo" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
width="450" height="200"
codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=5,0,0,0">
<param name="movie" value="What&who.swf">
<param name="play" value="false">
<param name="loop" value="false">
<script type="text/javascript">
<!--
if (detectPlugin())
{
document.write('<embed name="demo" src="What&who.swf" width="450" height="200"
play="false" loop="false" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_
Version=ShockwaveFlash5" swliveconnect="true"></embed>');
}
else
{
// you can write an image in here in a "real" version
document.write('Macromedia Flash is required for this demo');
}
//-->
</script>
<noscript>
JavaScript is required to demonstrate this functionality!
</noscript>
</object>
<form name="controlForm" id="controlForm" onsubmit="return false;" action="#"
method="get">
<input type="button" value="开始" onclick="play();">
<input type="button" value="暂停" onclick="stop();">
<input type="button" value="停止" onclick="rewind();"><p>
<input type="text" name="whichFrame" id="whichFrame">
<input type="button" value="跳转到帧"
onclick="changeFrame(controlForm.whichFrame.value);"><p>
<input type="text" name="zoomValue" id="zoomValue">
<input type="button" value="缩放" onclick="zoom(controlForm.zoomValue.value)">
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -