作者:广东在线游戏网日期:
返回目录:游戏解答
新建设一个主页 插入一个FLASH开场动画即可 DW-》插入-》FLASH
html5不会百就flash的吧。度
<div id="donghua">
<EMBED src=flash/donghua.swf width=1024 height=200 type=application/x-shockwave-flash quality="high" wmode="transparent">
</EMBED>
</div>
src=flash/donghua.swf //这里换知成你做道的flash所在路专径即属
单独做一个百flash开场动画。然后加入到dreamweaver 里面做一个单独的html文件、但是在flah播放的最后一帧加一度个超链接(getURL("你想要跳转的页面"));如果你要点击才跳转的话。那就要加内个按钮,再给按钮加跳转的代码:容AS2.0代码: on(release){getURL("你想要跳转的页面");}AS3.0代码:_btn.addEventListener(MouseEvent.CLICK,url);
只需增加一段代码就e799bee5baa6e997aee7ad94e78988e69d83330可以轻松的给自己的论坛(网站)增加一个类似于QQ空间那样的开场动画。
打开页面即出现一个FLASH,然后此FLASH慢慢消失。
脚本说明:
把如下代码加入<body>区域中
<script>
<!--
lstart=0
loop=true
speed=85
pr_step=3
newspeed=800
newspeed2=0
function makeObj(obj,nest){
nest=(!nest) ? '':'document.'+nest+'.'
this.css=(document.layers) ? eval(nest+'document.'+obj):eval(obj+'.style')
this.scrollHeight=(document.layers) ?
this.css.document.height:eval(obj+'.offsetHeight')
this.scrollWidth=(document.layers) ?
this.css.document.width:eval(obj+'.offsetWidth')
this.up=goUp
this.obj = obj + "Object"
eval(this.obj + "=this")
return this
}
function goUp(speed){
if(parseInt(this.css.top)>-(this.scrollHeight-0)){
this.css.top=parseInt(this.css.top)-pr_step-1
//alert("ok")
setTimeout(this.obj+".up("+speed+")",35)
}else {
if(navigator.appName == "Netscape")
{
tome=setInterval(this.obj+".setClipne()",50)}
else{
tome=setInterval('setClipie()',50)
tmp=divCont.style.clip;
}
}
}
function setClipne(){
//this.css.clip.right=this.css.clip.right-pr_step;
//this.css.clip.left=this.css.clip.left+pr_step;
//temp=parseInt(this.css.clip.right)-parseInt(this.css.clip.left);
if(temp==0)
{clearInterval(tome);document.divCont.document.divNews.visibility="hide";document.divCont.visibility="hide";}
}
function setClipie()
{
newspeed=newspeed-pr_step;
newspeed2=newspeed2+pr_step;
temp="rect(0px "+newspeed+"px 600px "+newspeed2+"px)";
this.css.clip=temp;
if(newspeed<newspeed2)
{
clearInterval(tome);
divNews.style.display="none"
divCont.style.display="none"
}
}
function slideInit(){
oSlide=makeObj('divNews','divCont')
oSlide.css.top=lstart
oSlide.up(speed)
}
function myload(){
setTimeout("slideInit()",4000);
}
myload()
//-->
</script>
<script language=javascript>
document.write("<div id=divAll style='position:absolute;'><div id=divCont style='position:absolute; width:386; height:60; top:0; left:-12; clip:rect(0,800,600,0)'><div id=divNews style='position:absolute; top:0; left:10; right:820'><embed src=XXX.swf qulity=high width=602 height=525 onload=myload ></embed></div></div></div>");
</script><script language=javascript>
{
if (navigator.appName == "Netscape")
{document.write("<layer id=divCont onLoad='moveToAbsolute(layer1.pageX-160,layer1.pageY);clip.height=600;clip.width=800; visibility=\"show\";'><layer id=divNews position:absolute; top:0; left:0><embed src=XXX.swf qulity=high width=602 height=25></embed></layer></layer>")}
}
</script>
自行修改颜色标记处