新闻动态切换图片html(flash)

效果图:

新闻动态切换图片html(flash)

代码:

<table id="table_zi">

                        <tr>

                            <td class="width330">

                                <!--新闻图片交替开始-->

                                <script type="text/javascript">

                                    imgUrl1 = "../images/news1.jpg";

                                    imgtext1 = "党校介绍1"

                                    imgLink1 = "#";

                                    imgUrl2 = "../images/news2.jpg";

                                    imgtext2 = "党校介绍2"

                                    imgLink2 = "#";

                                    imgUrl3 = "../images/news3.jpg";

                                    imgtext3 = "党校介绍3"

                                    imgLink3 = "#";

                                    imgUrl4 = "../images/news4.jpg";

                                    imgtext4 = "党校介绍4"

                                    imgLink4 = "#";

                                    imgUrl5 = "../images/news5.jpg";

                                    imgtext5 = "党校介绍5"

                                    imgLink5 = "#";



                                    var focus_width = 314

                                    var focus_height = 180

                                    var text_height = 0

                                    var swf_height = focus_height + text_height



                                    var pics = imgUrl1 + "|" + imgUrl2 + "|" + imgUrl3 + "|" + imgUrl4 + "|" + imgUrl5

                                    var links = imgLink1 + "|" + imgLink2 + "|" + imgLink3 + "|" + imgLink4 + "|" + imgLink5

                                    var texts = imgtext1 + "|" + imgtext2 + "|" + imgtext3 + "|" + imgtext4 + "|" + imgtext5



                                    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">');

                                    document.write('<param name="movie" value="../flash/focus1.swf">');

                                    document.write('<param name="quality" value="high">');

                                    document.write('<param name="bgcolor" value="#E1E1E1">');

                                    document.write('<param name="menu" value="false">');

                                    document.write('<param name=wmode value="opaque">');

                                    document.write('<param name="FlashVars" value="pics=' + pics + '&links=' + links + '&texts=' + texts + '&borderwidth=' + focus_width + '&borderheight=' + focus_height + '&textheight=' + text_height + '">');

                                    document.write('</object>');

                                </script>

                                <!--新闻图片交替结束-->

                            </td>

                            <!--动态新闻-->

                            <td runat="server" id="dongTaiXinWen">

                            </td>

                        </tr>

                    </table>

需要引入的文件:

http://pan.baidu.com/s/1gdiUER5

将此文件放到根目录下

 

你可能感兴趣的:(Flash)