View Full Version : animated window resizing.....
the truthbaby
15.06.2001, 07:41
no does any one know a good way of getting a browser window to resize (larger AND smaller) in an animation form rather than a simple self.resize()? an example of what imean is over at http://devlab.swift3d.com - go click on the first section wait for the load and then go to 'rock the bells' and veiw project. i would just link there but it would disable the code.
i've found a couple of answers on being a dreamweaver extentions of all things and and one that launches a new window and thne expands it across the screen.
what i'm trying to do is morph a window between different size page AND see it happening.
any help greatfully taken.
".....there's a fine line between clever and stupid"
Here's a very messy function I use to resize a popup:
<pre id=code><font face=courier size=2 id=code> function makeSize(x1,y1) {
if(document.layers) x2 = innerWidth;
else x2 = document.body.clientWidth;
if(document.layers) y2 = innerHeight;
else y2 = document.body.clientHeight-4;
//window.moveTo((screen.width / 2) - (x2 / 2),(screen.height / 2) - (y2 / 2));
if(y2 < y1+5 && y2 > y1-5 && x2 < x1+5 && x2 > x1-5) {
window.resizeTo(x1,y1);
window.moveTo((screen.width / 2) - (x1 / 2),(screen.height / 2) - (y1 / 2));
} else {
if(y1+4<y2) { window.resizeBy(0,-6); window.moveBy(0,3); }
if(y1-4>y2) { window.resizeBy(0,6); window.moveBy(0,-3); }
if(x1+4<x2) { window.resizeBy(-6,0); window.moveBy(3,0); }
if(x1-4>x2) { window.resizeBy(6,0); window.moveBy(-3,0); }
setTimeout("makeSize(" + x1 + "," + y1 + ")",10);
}
}</font id=code></pre id=code>
just call the function using: makeSize(400,300);
<font face='Courier New'><font color=maroon>»» Dan
»» dan@pupius.net
»» www.pupius.net || www.endoflow.com</font id=maroon></font id='Courier New'>
the truthbaby
15.06.2001, 10:15
<font face='Arial'></font id='Arial'>
cheers for that, but i'm having a total nightmare getting any of it to work.
any ideas?
cheers
ttb
".....there's a fine line between clever and stupid"
Do you have a link so I can see how you are trying to use it.
<font face='Courier New'><font color=maroon>»» Dan
»» dan@pupius.net
»» www.pupius.net || www.endoflow.com</font id=maroon></font id='Courier New'>
<BLOCKQUOTE id=quote><font size=1 face="Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>http://devlab.swift3d.com<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Arial, Helvetica" size=2 id=quote>
that is one kick ass flash site...
dayve
<center>
dayve@dhtmlcentral.com
Nine Inch Nails Forum
http://www.nineinchnailz.com/forum
</center>
the truthbaby
19.06.2001, 11:50
works a treat.. thanx
ttb
".....there's a fine line between clever and stupid"
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.