复制代码 代码如下:
<>
<SCRIPTsrc=top.js></SCRIPT>
<SCRIPTlanguage=javascript>
writeTop('Flash滚动显示图片代码生成','2006-10-18');
</SCRIPT>
<>
<SCRIPT>
//运行代码
functionrunEx(cod1){
cod=document.getElementById(cod1)
varcode=cod.value;
if(code!=""){
varnewwin=window.open('','','');
newwin.opener=null
newwin.document.write(code);
newwin.document.close();
}
}
//复制代码
functiondoCopy(ID){
if(document.all){
textRange=document.getElementById(ID).createTextRange();
textRange.execCommand("Copy");
}
else{
alert("此功能只能在IE上有效")
}
}
//展开_收起段落
functionclose_open(theID){
if(document.getElementById(theID).style.display!='none'){
document.getElementById(theID).style.display='none';
}
else
document.getElementById(theID).style.display='block';
}
</SCRIPT>
<SCRIPTlanguage=javascript>
//生成代码
functiongenCode()
{
varhtml='';
varpicUrl='';
varpicLink='';
varpicTitle='';
varpicWidth=0;
varpicHeight=0;
vartitleHeight=0;
varbackgroudn='';
{
vartempUrl='';
vartempLink='';
vartempTitle='';
for(i=0;i<9;++i){
tempUrl=document.getElementById('picUrl_'+(1+i)).value;
tempLink=document.getElementById('picLink_'+(1+i)).value;
tempTitle=document.getElementById('picTitle_'+(1+i)).value;
if(tempUrl=='')continue;
if(tempLink=='')tempLink=tempUrl;
if(tempTitle=='')tempTitle='无题';
picUrl+=tempUrl+'|';
picLink+=tempLink+'|';
picTitle+=tempTitle+'|';
}
picUrl=picUrl.substring(0,picUrl.length-1);
picTitle=picTitle.substring(0,picTitle.length-1);
picLink=picLink.substring(0,picLink.length-1);
picWidth=parseInt(document.getElementById('picWidth').value);
picHeight=parseInt(document.getElementById('picHeight').value);
titleHeight=parseInt(document.getElementById('titleHeight').value);
backgroudn=document.getElementById('backgroudn').value;
}
html+='<EMBEDpluginspage=http://www.macromedia.com/go/getflashplayersrc=http://staryxy.googlepages.com/PicPlay.swf';
html+='width='+picWidth;
html+='height='+(picHeight+titleHeight);
html+='type=application/x-shockwave-flashWMODE="opaque"FLASHVARS="';
html+='pics='+picUrl;
html+='&links='+picLink;
html+='&texts='+picTitle;
html+='&borderwidth='+picWidth;
html+='&borderheight='+picHeight;
html+='&textheight='+titleHeight;
html+='"MENU="false"';
html+='BGCOLOR="'+backgroudn;
html+='"QUALITY="high"ALLOWSCRIPTACCESS="sameDomain"></EMBED>';
document.getElementById('ShowCode').value=html;
show.innerHTML=html;
}
</SCRIPT>
<divstyle="margin-top:5px;background:#9abcde">
<divstyle='cursor:hand'onclick=close_open('edit')><li>设置</li></div>
<divid='edit'style="margin-left:15px;display:block;">
<divstyle="background:#cdcdcd">
图片显示宽度:<inputsize=10id=picWidthtitle="图片显示宽度"value="300"></input>
图片显示高度:<inputsize=10id=picHeighttitle="图片显示高度"value="200"></input>
文字区域高度:<inputsize=10id=titleheighttitle="文字区域高度"value="20"></input>
背景色:<inputsize=10id=backgroudntitle="背景色"value='#cdcdcd'></input>
</div>
<divstyle="background:#eeeeee">
图片一:
<inputmaxlength=2048size=25id=picUrl_1value="http://staryxy.googlepages.com/diner1.jpg"title="图片URL地址"></input>
链接地址:<inputmaxlength=2048size=25id=picLink_1value=""title="链接地址"></input>
说明:<inputmaxlength=2048size=20id=picTitle_1value="「夜宴」搞恶图片1"title="说明"></input>
</div>
<divstyle="background:#cdcdcd">
图片二:
<inputmaxlength=2048size=25id=picUrl_2value="http://staryxy.googlepages.com/diner2.jpg"title="图片URL地址"></input>
链接地址:<inputmaxlength=2048size=25id=picLink_2value=""title="链接地址"></input>
说明:<inputmaxlength=2048size=20id=picTitle_2value="「夜宴」搞恶图片2"title="说明"></input>
</div>
<divstyle="background:#eeeeee">
图片三:
<inputmaxlength=2048size=25id=picUrl_3value="http://staryxy.googlepages.com/diner4.jpg"title="图片URL地址"></input>
链接地址:<inputmaxlength=2048size=25id=picLink_3value=""title="链接地址"></input>
说明:<inputmaxlength=2048size=20id=picTitle_3value="「夜宴」搞恶图片3"title="说明"></input>
</div>
<divstyle="background:#cdcdcd">
图片四:
<inputmaxlength=2048size=25id=picUrl_4value="http://staryxy.googlepages.com/diner7.jpg"title="图片URL地址"></input>
链接地址:<inputmaxlength=2048size=25id=picLink_4value=""title="链接地址"></input>
说明:<inputmaxlength=2048size=20id=picTitle_4value="「夜宴」搞恶图片4"title="说明"></input>
</div>
<divstyle="background:#eeeeee">
图片五:
<inputmaxlength=2048size=25id=picUrl_5value="http://staryxy.googlepages.com/diner8.jpg"title="图片URL地址"></input>
链接地址:<inputmaxlength=2048size=25id=picLink_5value=""title="链接地址"></input>
说明:<inputmaxlength=2048size=20id=picTitle_5value="「夜宴」搞恶图片5"title="说明"></input>
</div>
<divstyle="background:#cdcdcd">
图片六:
<inputmaxlength=2048size=25id=picUrl_6value="http://staryxy.googlepages.com/diner12.jpg"title="图片URL地址"></input>
链接地址:<inputmaxlength=2048size=25id=picLink_6value=""title="链接地址"></input>
说明:<inputmaxlength=2048size=20id=picTitle_6value="「夜宴」搞恶图片6"title="说明"></input>
</div>
<divstyle='cursor:hand'onclick=close_open('editmore')><li>更多(推荐6张以下,否则说明将看不到)</li></div>
<divid='editmore'style='display:none;'>
<divstyle="background:#eeeeee">
图片七:
<inputmaxlength=2048size=25id=picUrl_7value=""title="图片URL地址"></input>
链接地址:<inputmaxlength=2048size=25id=picLink_7value=""title="链接地址"></input>
说明:<inputmaxlength=2048size=20id=picTitle_7value=""title="说明"></input>
</div>
<divstyle="background:#cdcdcd">
图片八:
<inputmaxlength=2048size=25id=picUrl_8value=""title="图片URL地址"></input>
链接地址:<inputmaxlength=2048size=25id=picLink_8value=""title="链接地址"></input>
说明:<inputmaxlength=2048size=20id=picTitle_8value=""title="说明"></input>
</div>
<divstyle="background:#eeeeee">
图片九:
<inputmaxlength=2048size=25id=picUrl_9value=""title="图片URL地址"></input>
链接地址:<inputmaxlength=2048size=25id=picLink_9value=""title="链接地址"></input>
说明:<inputmaxlength=2048size=20id=picTitle_9value=""title="说明"></input>
</div>
</div>
</div>
<div>
<inputtype=buttononclick='javascript:genCode();'value=生成代码>
</input>
</div>
</div>
<divstyle="margin-top:5px;background:#9abcde">
<divonclick=close_open('code')style='cursor:hand'><li>代码</li></div>
<divid='code'style='margin-left:15px;display:none;'>
<TEXTAREArows="15"id="ShowCode"style="width:100%">
<>
</TEXTAREA>
</div>
<div>
<INPUTonclick="runEx('ShowCode')"type="button"value="运行此代码"/>
<INPUTonclick="doCopy('ShowCode')"type="button"value="复制此代码"/>
[Ctrl+A全部选择提示:你可先修改部分代码,再按运行]
</div>
</div>
<divstyle="margin-top:5px;background:#9abcde;">
<divonclick=close_open('show')style='cursor:hand'><li>显示效果</li></div>
<divid='show'title="显示效果"align=centerstyle="margin-left:15px;display:none;background:#abcdef">
还没有
</div>
</div>
</div>