如何自动在div中的swf文件之间切换?

时间:2013-12-11 16:38:08

标签: html flash swfobject alternate

我有一些swf文件,我会让它们每10秒自动交替一次,有一种方法可以使用html做到这一点吗?

我的div现在是这样的:

<div class="main">
<div class="main_content">
    <object width="100%" height="100%">
            <param name="movie" value="images/lobby.swf">
            <embed src="images/lobby.swf" width="100%" height="100%">
            </embed>
            </object>
</div>
<div class="main_content_left">

    <h1 class="bolder">11 de dezembro de 2013</h1>
    <h2> Convenção Nike </h2>
    </div>
</div>

1 个答案:

答案 0 :(得分:0)

终于解决了我的问题,下面是我得到的代码:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Some title</title>
<link href="tools/style.css" rel="stylesheet" type="text/css" />
<script src="tools/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="tools/jquery.cycle.all.js" type="text/javascript"></script>

<script type="text/javascript">

$(function () {
  $('#flash').cycle({fx: 'zoom', speed: 10000.], timeout:8000 });
        });
</script>
</head>

  <body>

<div id="flash">

 <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="1550px" height="630">
 <param name="movie" value="images/myimage1.swf" />
 <param name="quality" value="high" />
 <param name="wmode" value="transparent">
 <embed src="images/myimage1.swf" quality="high" type="application/x-shockwave-flash" width="1550px" height="630" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" />
 </object>

 <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="1550px" height="630">
 <param name="movie" value="images/myimage2.swf" />
 <param name="quality" value="high" />
 <param name="wmode" value="transparent">
 <embed src="images/myimage2.swf" quality="high" type="application/x-shockwave-flash" width="1550px" height="630" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" />
 </object>

 <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"  codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="1550px" height="630">
 <param name="movie" value="images/myimage3.swf" />
 <param name="quality" value="high" />
 <param name="wmode" value="transparent">
 <embed src="images/myimage13.swf" quality="high" type="application/x-shockwave-flash" width="1550px" height="630" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" />
 </object>

</div>
</body>
</html>