Uso de Window.CreatePopup () implementa con éxito un flash sin ventana en el escritorio.
Guarde el siguiente código como Qq.hta y haga doble clic para ejecutar. Cierre el método, simplemente cierre mshta.exe en el administrador de tareas.
El código es el siguiente:
<Hta: aplicación id = "ohta"
ApplicationName = "MyApp"
Border = "ninguno"
Subtítulos = "no"
Icon = "FileName.ico"
MaximizeButton = "no"
MinimizeButton = "no"
ShowInTaskBar = "No"
Ingleinstance = "no"
Sysmenu = "no"
Versión = "1.0"
WindowState = "Minimizar"
/>
<script language = "javaScript" type = "text/javaScript">
función mm_reloadpage (init) {// Recarga la ventana si Nav4 cambia de tamaño
if (init == true) con (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) ubicación.reload ();
}
Mm_reloadpage (verdadero);
var ImageWidth = 200 // Estas dos líneas escriben el tamaño de la ventana emergente
var ImageHeight = 200
velocidad var = 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;
}
demás {
isie = 0;
}
función 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-4444553540000" codeBase = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"> <param names valor = "// files.jb51.net/demoimg/200912/qqpet.swf"/> <param name = "calidad" valor = "alto"/> <param name = "wmode" value = "transparent"/> <param name = bgcolor value =#ffffff> <Embredido src = "https://files.jb51.net/demoimg/200912/qqpet.swf" wmode = "transparent" Quality = "high" pluginspage = "http://www.macromedia.com/go/getplayer" type = "application/x-shockwave-flash"> </embromed> '
var x = 0, y = 0, dx = velocidad, dy = velocidad;
var OpoPup = Window.CreatePopUp ();
var OpoPupbody = OpoPup.Document.Body;
//opopup.document.bgcolor="orange "; // color de fondo naranja
opopup.document.bgcolor = "#ffffff"; // fondo blanco
Opopupbody.innerhtml = str;
estallido();
}
</script>