项目中首页有个图片广告轮流播放的功能,看了一下是用flash+javascript实现的。在网上google了一下,原来网上已有此解决方案。

原理:使用JAVASCRIPT和FLASH进行数据交换

文件:一个调用FLASH和含有JAVASCRIPT的html文件+一个广告FLASH文件

<script type="text/javascript">   
  
<!--   
  var focus_width=365;  
  
var focus_height=420
  
var text_height=0
  
var swf_height = focus_height+text_height;  
         
var pics='http:www.pconline.com.cn/test/toptitle/images/picpath/pmareddian365.jpg|http:www.pconline.com.cn/test/toptitle/images/picpath/jiadian(2).JPG|http:www.pconline.com.cn/test/toptitle/images/picpath/02232yuejiangkpfoc.jpg'; 
  
var links='http:www.pconline.com.cn/digital/dc/news/cmt/0602/760853.html|http:www.pconline.com.cn/digital/family/|http:www.pconline.com.cn/digital/audio/daogou/mp3/time/0602/760219.html'
  
var texts='DC|家电|随身听';
    
  document.write(
'<object ID="focus_flash" class>  

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-06
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-05
  • 2021-07-02
  • 2021-04-06
  • 2022-01-04
  • 2022-12-23
  • 2022-02-07
相关资源
相似解决方案