一个模仿MSN的弹出窗口FLASH的效果,修改src处的FLASH路径,宽和高,时间可根据需要重定义。
<SCRIPT>
var oPopup = window.createPopup();
var popTop=50;
function popmsgswf(){
var winstr="<embed src=\"Ad/flash.swf\" width=\"320\" height=\"240\"></embed>"
oPopup.document.body.innerHTML = winstr;
popshow();
}
function popshow(){
window.status=popTop;
if(popTop>1720){
clearTimeout(mytime);
oPopup.hide();
return;
}else if(popTop>1520&&popTop<1720){
oPopup.show(screen.width-320,screen.height,320,1720-popTop);
}else if(popTop>1500&&popTop<1520){
oPopup.show(screen.width-320,screen.height+(popTop-1720),320,240);
}else if(popTop<180){
oPopup.show(screen.width-320,screen.height,320,popTop);
}else if(popTop<220){
oPopup.show(screen.width-320,screen.height-popTop,320,240);
}
popTop+=10;
var mytime=setTimeout("popshow();",50);
}
popmsgswf();
</SCRIPT>
var oPopup = window.createPopup();
var popTop=50;
function popmsgswf(){
var winstr="<embed src=\"Ad/flash.swf\" width=\"320\" height=\"240\"></embed>"
oPopup.document.body.innerHTML = winstr;
popshow();
}
function popshow(){
window.status=popTop;
if(popTop>1720){
clearTimeout(mytime);
oPopup.hide();
return;
}else if(popTop>1520&&popTop<1720){
oPopup.show(screen.width-320,screen.height,320,1720-popTop);
}else if(popTop>1500&&popTop<1520){
oPopup.show(screen.width-320,screen.height+(popTop-1720),320,240);
}else if(popTop<180){
oPopup.show(screen.width-320,screen.height,320,popTop);
}else if(popTop<220){
oPopup.show(screen.width-320,screen.height-popTop,320,240);
}
popTop+=10;
var mytime=setTimeout("popshow();",50);
}
popmsgswf();
</SCRIPT>