-
how do they do this???
how do they do the resizing of the html window on
http://www.davidwaxman.net/
if anyone could point me in the right direction that would be great. thanks.
-
Code:
<SCRIPT LANGUAGE="JavaScript" SRC="./global.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
var myMovie;
function init()
{ if(String(navigator.platform).match("Win"))
{ myMovie = document.getElementById("glennSucks");
myMovie.StopPlay();
growMe(700,300);
window.setTimeout('myMovie.Play();',2000);
} else
{ growMe(700,300);
}
}
function done_intro()
{ if(String(navigator.platform).match("Win"))
{ myMovie.StopPlay();
growMe(800,600);
window.setTimeout('myMovie.Play();',2000);
} else
{ growMe(800,600);
}
}
</SCRIPT>
that is how he does it. hope that helps
Great minds think for themselves.
-
hey thanks a lot. but i am just wondering how ya initiate this script from within flash using java. thaks for the time. Patrick
-
AS in flash:
PHP Code:
getURL("JavaScript:functionname();");
This information is subject to change without notice and
is provided "as is" with no warranty.
-
sorry but i can't get it to work. if it would be not too much trouble could you tell me it. I have a window that i would like to be resized called Access.html and my homepage will tell it to open and then flash on Access.html will tell it to resize. Hope you get it. Thanks for the time
-
say no more
Haven't looked at it myself but that bit of code that was posted is only a bit of whats going on. see the bit that says "SRC="./global.js" - Well that global.js is a file that contains all the code to do any moving or resizingof a window. They call a function called growme which they will have defined in global.js
You cant just call a function that doesn't exist, which is what you're doing. You'd need to see the global.js to figure out how they did it.
-
lol sorry about that. here is the global.js
Code:
var rate,xnow,ynow,xres,yres,ScreenW,ScreenH,C_Left,C_Top,popWindow;
xres = 348;
yres = 149;
ScreenW = window.screen.availWidth;
ScreenH = window.screen.availHeight;
if(String(navigator.platform).match("Win"))
{ rate = 5;
} else
{ rate = 20;
}
function growMe(Nxres,Nyres)
{ if(Nxres != xres || Nyres != yres)
{ xnow = xres;
xres = Nxres;
ynow = yres;
yres = Nyres;
}
done = 0;
if(xnow<xres)
{ xnow += (rate*1.5);
} else
{ done++;
}
if(ynow<yres)
{ ynow += rate;
} else
{ done++;
}
resizeTo(xnow,ynow);
moveTo((ScreenW-xnow)/2,(ScreenH-ynow)/2);
if(done!=2)
{ setTimeout(String("growMe(" + xres + "," + yres + ")"),10);
} else
{ if(xres == 800)
{ resizeTo(xres,yres+10);
moveTo(((ScreenW-xres)/2),((ScreenH-yres)/2));
var theMovie = document.getElementById("glennSucks");
theMovie.width = 800;
theMovie.height = 600;
} else
{ resizeTo(xres,yres+24);
moveTo(((ScreenW-xres)/2),((ScreenH-yres)/2));
}
}
}
Great minds think for themselves.
-
thanks. i have to get some time then ill play with it. hopeully it works. thanks for the time. Patrick
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|