Desktop floating Flash_hta with HTA

Source: Internet
Author: User
Successfully implemented with Window.createpopup () to display a windowless flash on the desktop.
Save the following code as Qq.hta, and double-click to run it. Close the method and close Mshta.exe in Task Manager.
Copy Code code as follows:

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//The size of these two-line write pop-up windows
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=" "height=" "><param name=" movie "Value=" http://files.jb51.net/demoimg/200912/qqpet.swf "/><param name=" quality "value=" High "/><param name=" Wmode "value=" Transparent "/><param name=bgcolor value= #FFFFFF ><embed src=" http://files.jb51.net/ demoimg/200912/qqpet.swf "wmode=" Transparent "quality=" High "pluginspage=" http://www.macromedia.com/go/ Getflashplayer "type=" Application/x-shockwave-flash "width=" "height=" 190 "></embed></object>";


var x=0,y=0,dx=speed,dy=speed;
var opopup = Window.createpopup ();
var opopupbody = oPopup.document.body;
Opopup.document.bgcolor= "Orange"; Orange background Color
Opopup.document.bgcolor= "#ffffff"; White background
opopupbody.innerhtml = str;
Pop ();
}

</script>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.