PDA

Click to See Complete Forum and Search --> : how to make the screen shake?



sweet_turkey
02-11-2003, 02:55 PM
can somebody explain how that shaking sequence during the intro from
www.allmediastudios.com was done...thx for your help :grouphug:

gerbick
02-11-2003, 05:00 PM
that's done with JavaScript embedded in the HTML page, and triggered via a JavaScript function call in the Flash movie.


<SCRIPT LANGUAGE="JavaScript1.2">

<!-- Begin
function shake(n) {
if (parent.moveBy) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
parent.moveBy(0,i);
parent.moveBy(i,0);
parent.moveBy(0,-i);
parent.moveBy(-i,0);
}
}
}
}
// End -->
</script>

sweet_turkey
02-11-2003, 05:31 PM
appreciate your expertise