tuablove 发表于 2007-3-31 10:04

[求助]高手修改这个flash+js的图片切换,求教

<P>这个里面只能加载jpg的图片,怎么修改加载gif和bmp的图片<BR>代码如下:(我不会让它运行在论坛里,只能帖代码)<BR>&lt;a target=_self href="javascript:goUrl()"&gt; <BR>                    &lt;span class="f14b"&gt;<BR>                    &lt;script type="text/javascript"&gt;<BR>imgUrl1="<a href="http://www.webjx.com/img/200406301.jpg" target="_blank" >http://www.webjx.com/img/200406301.jpg</A>";<BR>imgtext1="网页教学网制作素材"<BR>imgLink1=escape("<a href="http://www.webjx.com/htmldata/sort/8.html" target="_blank" >http://www.webjx.com/htmldata/sort/8.html</A>");<BR>imgUrl2="<a href="http://www.webjx.com/img/200406302.jpg" target="_blank" >http://www.webjx.com/img/200406302.jpg</A>";<BR>imgtext2="网页教学网网页制作专区"<BR>imgLink2=escape("<a href="http://www.webjx.com/htmldata/sort/3.html" target="_blank" >http://www.webjx.com/htmldata/sort/3.html</A>");<BR>imgUrl3="<a href="http://www.webjx.com/img/200406303.jpg" target="_blank" >http://www.webjx.com/img/200406303.jpg</A>";<BR>imgtext3="网页教学网网页特效专区"<BR>imgLink3=escape("<a href="http://www.webjx.com/htmldata/sort/5.html" target="_blank" >http://www.webjx.com/htmldata/sort/5.html</A>");<BR>imgUrl4="<a href="http://www.webjx.com/img/200406304.jpg" target="_blank" >http://www.webjx.com/img/200406304.jpg</A>";<BR>imgtext4="网页教学网视频教程"<BR>imgLink4=escape("<a href="http://www.webjx.com/htmldata/sort/15.html" target="_blank" >http://www.webjx.com/htmldata/sort/15.html</A>");<BR>imgUrl5="<a href="http://www.webjx.com/img/200406305.jpg" target="_blank" >http://www.webjx.com/img/200406305.jpg</A>";<BR>imgtext5="网页教学网网页制作书籍"<BR>imgLink5=escape("<a href="http://www.webjx.com/htmldata/sort/7.html" target="_blank" >http://www.webjx.com/htmldata/sort/7.html</A>");</P>
<P> var focus_width=280<BR> var focus_height=158<BR> var text_height=18<BR> var swf_height = focus_height+text_height<BR> <BR> var pics=imgUrl1+"|"+imgUrl2+"|"+imgUrl3+"|"+imgUrl4+"|"+imgUrl5<BR> var links=imgLink1+"|"+imgLink2+"|"+imgLink3+"|"+imgLink4+"|"+imgLink5<BR> var texts=imgtext1+"|"+imgtext2+"|"+imgtext3+"|"+imgtext4+"|"+imgtext5<BR> <BR> document.write('&lt;object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="<a href="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" target="_blank" >http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0</A>" width="'+ focus_width +'" height="'+ swf_height +'"&gt;');<BR> document.write('&lt;param name="allowScriptAccess" value="sameDomain"&gt;&lt;param name="movie" value="<a href='http://www.webjx.com/js/focus.swf" target="_blank" ><param'>http://www.webjx.com/js/focus.swf"&gt;&lt;param</A> name="quality" value="high"&gt;&lt;param name="bgcolor" value="#F0F0F0"&gt;');<BR> document.write('&lt;param name="menu" value="false"&gt;&lt;param name=wmode value="opaque"&gt;');<BR> document.write('&lt;param name="FlashVars" value="pics='+pics+'&amp;links='+links+'&amp;texts='+texts+'&amp;borderwidth='+focus_width+'&amp;borderheight='+focus_height+'&amp;textheight='+text_height+'"&gt;');<BR> document.write('&lt;embed src="pixviewer.swf" wmode="opaque" FlashVars="pics='+pics+'&amp;links='+links+'&amp;texts='+texts+'&amp;borderwidth='+focus_width+'&amp;borderheight='+focus_height+'&amp;textheight='+text_height+'" menu="false" bgcolor="#F0F0F0" quality="high" width="'+ focus_width +'" height="'+ focus_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="<a href="http://www.macromedia.com/go/getflashplayer" target="_blank" >http://www.macromedia.com/go/getflashplayer</A>" /&gt;');  document.write('&lt;/object&gt;');<BR> </P>
<P> &lt;/script&gt;<BR>                    &lt;/span&gt;&lt;/a&gt;&lt;span id=focustext class=f14b&gt; &lt;/span&gt;<BR></P>

tuablove 发表于 2007-3-31 10:04

<P>[CODE]&lt;a target=_self href="javascript:goUrl()"&gt; <BR>                    &lt;span class="f14b"&gt;<BR>                    &lt;script type="text/javascript"&gt;<BR>imgUrl1="<a href="http://www.webjx.com/img/200406301.jpg" target="_blank" >http://www.webjx.com/img/200406301.jpg</A>";<BR>imgtext1="网页教学网制作素材"<BR>imgLink1=escape("<a href="http://www.webjx.com/htmldata/sort/8.html" target="_blank" >http://www.webjx.com/htmldata/sort/8.html</A>");<BR>imgUrl2="<a href="http://www.webjx.com/img/200406302.jpg" target="_blank" >http://www.webjx.com/img/200406302.jpg</A>";<BR>imgtext2="网页教学网网页制作专区"<BR>imgLink2=escape("<a href="http://www.webjx.com/htmldata/sort/3.html" target="_blank" >http://www.webjx.com/htmldata/sort/3.html</A>");<BR>imgUrl3="<a href="http://www.webjx.com/img/200406303.jpg" target="_blank" >http://www.webjx.com/img/200406303.jpg</A>";<BR>imgtext3="网页教学网网页特效专区"<BR>imgLink3=escape("<a href="http://www.webjx.com/htmldata/sort/5.html" target="_blank" >http://www.webjx.com/htmldata/sort/5.html</A>");<BR>imgUrl4="<a href="http://www.webjx.com/img/200406304.jpg" target="_blank" >http://www.webjx.com/img/200406304.jpg</A>";<BR>imgtext4="网页教学网视频教程"<BR>imgLink4=escape("<a href="http://www.webjx.com/htmldata/sort/15.html" target="_blank" >http://www.webjx.com/htmldata/sort/15.html</A>");<BR>imgUrl5="<a href="http://www.webjx.com/img/200406305.jpg" target="_blank" >http://www.webjx.com/img/200406305.jpg</A>";<BR>imgtext5="网页教学网网页制作书籍"<BR>imgLink5=escape("<a href="http://www.webjx.com/htmldata/sort/7.html" target="_blank" >http://www.webjx.com/htmldata/sort/7.html</A>");</P>
<P> var focus_width=280<BR> var focus_height=158<BR> var text_height=18<BR> var swf_height = focus_height+text_height<BR> <BR> var pics=imgUrl1+"|"+imgUrl2+"|"+imgUrl3+"|"+imgUrl4+"|"+imgUrl5<BR> var links=imgLink1+"|"+imgLink2+"|"+imgLink3+"|"+imgLink4+"|"+imgLink5<BR> var texts=imgtext1+"|"+imgtext2+"|"+imgtext3+"|"+imgtext4+"|"+imgtext5<BR> <BR> document.write('&lt;object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="<a href="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" target="_blank" >http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0</A>" width="'+ focus_width +'" height="'+ swf_height +'"&gt;');<BR> document.write('&lt;param name="allowScriptAccess" value="sameDomain"&gt;&lt;param name="movie" value="<a href='http://www.webjx.com/js/focus.swf" target="_blank" ><param'>http://www.webjx.com/js/focus.swf"&gt;&lt;param</A> name="quality" value="high"&gt;&lt;param name="bgcolor" value="#F0F0F0"&gt;');<BR> document.write('&lt;param name="menu" value="false"&gt;&lt;param name=wmode value="opaque"&gt;');<BR> document.write('&lt;param name="FlashVars" value="pics='+pics+'&amp;links='+links+'&amp;texts='+texts+'&amp;borderwidth='+focus_width+'&amp;borderheight='+focus_height+'&amp;textheight='+text_height+'"&gt;');<BR> document.write('&lt;embed src="pixviewer.swf" wmode="opaque" FlashVars="pics='+pics+'&amp;links='+links+'&amp;texts='+texts+'&amp;borderwidth='+focus_width+'&amp;borderheight='+focus_height+'&amp;textheight='+text_height+'" menu="false" bgcolor="#F0F0F0" quality="high" width="'+ focus_width +'" height="'+ focus_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="<a href="http://www.macromedia.com/go/getflashplayer" target="_blank" >http://www.macromedia.com/go/getflashplayer</A>" /&gt;');  document.write('&lt;/object&gt;');<BR> </P>
<P> &lt;/script&gt;<BR>                    &lt;/span&gt;&lt;/a&gt;&lt;span id=focustext class=f14b&gt; &lt;/span&gt;<BR>[/CODE]</P>

tuablove 发表于 2007-3-31 10:06

二楼可以运行,高手给看看...

huangyong 发表于 2007-3-31 10:24

给你一个:<BR>[attach]18540[/attach]<BR>

tuablove 发表于 2007-3-31 10:28

<P>谢谢先,不过大哥,你这个和我这个就是一个东西,<BR>还是只能加载jpg的图片[em04]</P>

huangyong 发表于 2007-4-3 08:28

<P>你墉gif或者bmp格式的图片一样可以用的啊!<BR><BR>我试过了,可以用的。</P>

cyyu_ryh 发表于 2007-4-3 13:30

收藏[em01]

suqian 发表于 2007-8-11 10:45

回复:(tuablove)[求助]高手修改这个flash+js的图片...

你这个图片是固定的,能不能写一个asp.net2.0的代码从数据库动态的取出图片的路径。我期待。

lmhllr 发表于 2007-8-12 16:42

当然可以,变通一下把imaUrl和imaText变成动态读出就行了<BR><BR>自己想一下就出来,别一味要代码...

页: [1]

编程论坛