求高手指教!!网页中插入swf视频,但是没有暂停等按钮怎么添加???
在页面中插入swf格式的视频,打开页面后视频自动播放,但是没有暂停的按钮,没办法把它停住。代码如下:<DIVid="democv"><objectid="vcastr3"...
在页面中插入swf格式的视频,打开页面后视频自动播放,但是没有暂停的按钮,没办法把它停住。
代码如下:
<DIV id="democv">
<object id="vcastr3" data="/uploads/vcastr3.swf" height="165px" width="260px" align="center" type="application/x-shockwave-flash">
<param name="movie" value="vcastr3.swf">
<param name="allowFullScreen" value="true">
<param name="bgColor" value="#000000">
<param name="FlashVars" value="xml=vcastr.xml">
</object>
</DIV>
我打开其他网站上的视频地址,本身就有暂停快进等,打开我自己的这个视频(都是网站视频地址),本身就没有暂停的按钮,这是视频本身的问题???
求高手指教!!! 展开
代码如下:
<DIV id="democv">
<object id="vcastr3" data="/uploads/vcastr3.swf" height="165px" width="260px" align="center" type="application/x-shockwave-flash">
<param name="movie" value="vcastr3.swf">
<param name="allowFullScreen" value="true">
<param name="bgColor" value="#000000">
<param name="FlashVars" value="xml=vcastr.xml">
</object>
</DIV>
我打开其他网站上的视频地址,本身就有暂停快进等,打开我自己的这个视频(都是网站视频地址),本身就没有暂停的按钮,这是视频本身的问题???
求高手指教!!! 展开
展开全部
一般都是在swf中做成按钮的。实在没有,自己通过html内嵌js来控制。html中自己画按钮,在器click中调用相应的函数
js举例如下:
<script type="text/javascript">
<!--
function startMovie() {
var oFlashMovie = document.getElementById("vcastr3");
oFlashMovie.Play();
}
function stopMovie() {
var oFlashMovie = document.getElementById("vcastr3");
oFlashMovie.StopPlay();
}
function rewindMovie() {
var oFlashMovie = document.getElementById("vcastr3");
oFlashMovie.Rewind();
}
function displayFrameCount() {
var oFlashMovie = document.getElementById("vcastr3");
if (typeof oFlashMovie == "function") {
alert("There are " + oFlashMovie.TotalFrames() + " frames in the movie.");
} else {
alert("There are " + oFlashMovie.TotalFrames + " frames in the movie.");
}
}
function displayIsMoviePlaying() {
var oFlashMovie = document.getElementById("vcastr3");
if (oFlashMovie.IsPlaying()) {
alert("The movie is playing.");
} else {
alert("The movie is stopped.");
}
}
//-->
</script>
js举例如下:
<script type="text/javascript">
<!--
function startMovie() {
var oFlashMovie = document.getElementById("vcastr3");
oFlashMovie.Play();
}
function stopMovie() {
var oFlashMovie = document.getElementById("vcastr3");
oFlashMovie.StopPlay();
}
function rewindMovie() {
var oFlashMovie = document.getElementById("vcastr3");
oFlashMovie.Rewind();
}
function displayFrameCount() {
var oFlashMovie = document.getElementById("vcastr3");
if (typeof oFlashMovie == "function") {
alert("There are " + oFlashMovie.TotalFrames() + " frames in the movie.");
} else {
alert("There are " + oFlashMovie.TotalFrames + " frames in the movie.");
}
}
function displayIsMoviePlaying() {
var oFlashMovie = document.getElementById("vcastr3");
if (oFlashMovie.IsPlaying()) {
alert("The movie is playing.");
} else {
alert("The movie is stopped.");
}
}
//-->
</script>
追问
这样啊。。。这个swf是mpg视频用格式工厂转过来的,我没找到这个选项,再请问能转成带暂停的么??或者转成其他哪种格式好些?
追答
有mpg转flash的工具,你百度一下。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询