FOOOD
10-04-2001, 04:47 PM
I'm using this screenshakercript (javascript) that basically puts a button on your screen that when pushed makes the whole screen shudder (the toolbars & everything, not just the center part. (looks cool!)
What I want to know is, can a piece of flash animation activate the javascript & make the screen shudder without the person looking at the page having to push the button?
Here's the javascript
2 parts to this script
==============================================
part 1
===============================================
<SCRIPT LANGUAGE="JavaScript1.2">
<!-- Begin
netscape = (navigator.appName == "Netscape");
n4 = netscape && (parseInt(navigator.appVersion) >= 4);
explorer = (navigator.appName == "Microsoft Internet Explorer");
ie4 = explorer && (parseInt(navigator.appVersion) >= 4);
function shake(n) {
if (n4 || ie4) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
self.moveBy(0,i);
self.moveBy(i,0);
self.moveBy(0,-i);
self.moveBy(-i,0);
}
}
}
}
// End -->
</script>
===========================================================
Part 2
=========================================================
<!-- a1 --><center>
<form>
<input type=button onClick="shake(2)" value="Shake Screen">
</form>
</center><!-- -->
Can I make flash play an animation when the screen loads & activate the javascipt?
What I want to know is, can a piece of flash animation activate the javascript & make the screen shudder without the person looking at the page having to push the button?
Here's the javascript
2 parts to this script
==============================================
part 1
===============================================
<SCRIPT LANGUAGE="JavaScript1.2">
<!-- Begin
netscape = (navigator.appName == "Netscape");
n4 = netscape && (parseInt(navigator.appVersion) >= 4);
explorer = (navigator.appName == "Microsoft Internet Explorer");
ie4 = explorer && (parseInt(navigator.appVersion) >= 4);
function shake(n) {
if (n4 || ie4) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
self.moveBy(0,i);
self.moveBy(i,0);
self.moveBy(0,-i);
self.moveBy(-i,0);
}
}
}
}
// End -->
</script>
===========================================================
Part 2
=========================================================
<!-- a1 --><center>
<form>
<input type=button onClick="shake(2)" value="Shake Screen">
</form>
</center><!-- -->
Can I make flash play an animation when the screen loads & activate the javascipt?