PDA

View Full Version : resizing browser halfway thru a movie


mosquito
03-05-2001, 03:49 PM
is it possible to resize the browser window hlafway thru a movie clip in flash?

please say yes!!!!
oh...and how to do it : )

edeveloper
03-05-2001, 06:16 PM
put this between the <head></head> tags:
<script language="javascript">
function shrink(){
//2 pixel movement
var i = 2;
//moving the window to give a shrinking effect while the
//window is going through the resize loop
if (self.moveBy) {
for (k =8; k > 0; k--) {
for (j = 3; j > 0; j--) {

self.moveBy(0,i);

self.moveBy(i,0);

self.moveBy(0,-i);

self.moveBy(-i,0);
window.resizeBy(-2, - 2)
window.moveBy(1,0)

}
}
}
}
</script>

this goes on the frame you want to trigger the event:
getURL ("javascript:shrink()");

oh, and it won't work if the window is maximize.
and, if you just want to resize the window without the cool effect:

function shrink(){
self.resizeTo(width,height)
}

[Edited by edeveloper on 03-05-2001 at 12:22 PM]