新港紫云中学:为什么flash焦点图片广告中我自己做的JPG格式的图片在flash里就显示不了,网上下载的没有问题。

来源:百度文库 编辑:神马品牌网 时间:2024/04/27 15:53:30
比如下边的图片用网上拷贝的没有问题,但我用PS自己做的就是出不来,大侠们帮我解决一下。

<!--焦点图开始-->
<SCRIPT type=text/javascript>
var focus_width=400 //宽度(flash源文件不用修改,把要显示的图片设置同样大小)
var focus_height=300 //高度
var text_height=0
var swf_height = focus_height+text_height

var pics= 'UploadFiles/2005-12/123911968.jpg|UploadFiles/2005-12/123337273.jpg|UploadFiles/2005-12/123820013.jpg' //图片地址
var links='http://stonesky.51r.com|http://stonesky.51r.com|http://stonesky.51r.com' //相对于图片的链接地址
var texts='|||'
document.write('<object ID="focus_flash" 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="UploadFiles/2005-12/123600684.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+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
document.write('<embed ID="focus_flash" src="UploadFiles/2005-12/123600684.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#C5C5C5" quality="high" width="'+ focus_width +'" height="'+ swf_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
document.write('</object>');
</SCRIPT>
<!--焦点图结束-->

直接在图片元件上为其增加一层,设为遮罩层,然后画一个想要的图形,把要隐去边角的图片设为被遮罩层。