由于做的网页中需要一个图片播放器,其中播放器的图片需要从数据库中动态调用,效果如CSDN网站主页(http://www.csdn.net/)中的那个图片可以动态切换的那种播放器,还有http://www.uuu9.com/这网站里的那个图片播放器。可以通过点击右下角的1,2,3,4随时切换图片的那种。  由于对JS了解的不够深,flash也不懂,我在网上查了很多资料的介绍,但是还是没看明白,求各位高手给个实例学习下。

解决方案 »

  1.   

    <script type="text/javascript">
    <s:iterator var="logoVo" value="dfcompanyinfo.xmjs4Pic" status="index">
    imgUrl${index.count}="<%=path %>/busImage/${logoVo.image_Name}";
      </s:iterator>
     var focus_width=230
     var focus_height=185
     var text_height=18
     var swf_height = focus_height+text_height
     var pics=imgUrl1+"|"+imgUrl2+"|"+imgUrl3+"|"+imgUrl4
     document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">');
     document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="<%=path %>/front/image/focus1.swf"><param name="quality" value="high"><param name="bgcolor" value="#ffffff">');
     document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
     document.write('<param name="FlashVars" value="pics='+pics+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
     document.write('</object>');
    </script>刚好我这里有一个