用window.createPopup()成功实现了在桌面显示一个无窗口的flash.
将下面的代码,保存为qq.hta,双击运行即可。关闭方法,任务管理器中关闭mshta.exe即可。
复制代码 代码如下:
<HTA:APPLICATION ID="oHTA"
APPLICATIONNAME="myApp"
BORDER="none"
CAPTION="no"
ICON="filename.ico"
MAXIMIZEBUTTON="no"
MINIMIZEBUTTON="no"
SHOWINTASKBAR="no"
INGLEINSTANCE="no"
SYSMENU="no"
VERSION="1.0"
WINDOWSTATE="minimize"
/>


<script language="JavaScript" type="text/JavaScript">

function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}

MM_reloadPage(true);

var imagewidth=200 //这两行写弹出窗口的大小
var imageheight=200
var speed=3;
var isie=0;

if(window.navigator.appName=="Microsoft Internet Explorer"&&window.navigator.appVersion.substring(window.navigator.appVersion.indexOf("MSIE")+5,window.navigator.appVersion.indexOf("MSIE")+8)>=5.5) {
isie=1;
}
else {
isie=0;
}

function pop() {
if(isie) {
x=x+dx;y=y+dy;
oPopup.show(x, y, imagewidth, imageheight);
if(x+imagewidth+5>screen.width) dx=-dx;
if(y+imageheight+5>screen.height) dy=-dy;
if(x<0) dx=-dx;
if(y<0) dy=-dy;
startani=setTimeout("pop();",50);
}
}


if(isie) {
var str='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="200" height="200"><param name="movie" value="//img.jbzj.com/demoimg/200912/qqpet.swf" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><PARAM NAME=bgcolor value=#FFFFFF><embed src="/UploadFiles/2021-04-08/qqpet.swf">

var x=0,y=0,dx=speed,dy=speed;
var oPopup = window.createPopup();
var oPopupBody = oPopup.document.body;
//oPopup.document.bgColor="orange"; //桔黄色背景颜色
oPopup.document.bgColor="#ffffff"; //白色背景
oPopupBody.innerHTML = str;
pop();
}

</script>
标签:
桌面漂浮,flash

免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
白云城资源网 Copyright www.dyhadc.com

评论“用hta实现的桌面漂浮flash”

暂无“用hta实现的桌面漂浮flash”评论...