Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

browser shaking

Status
Not open for further replies.

bubu

Programmer
Mar 3, 2002
463
RO
How can i make the browser "shaking" when i press a button?

Regards,
BUBU
dragos.jpg
 
Hey
when i did it, i used javascript right in the html header
here is an example

<SCRIPT LANGUAGE=&quot;JavaScript1.2&quot;>
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! -->
<!-- Modified by Flash kit -->
function shake_xy(n) {
if (self.moveBy) {
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);
}
}
}
}
function shake_x(n) {
if (self.moveBy) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
self.moveBy(i,0);
self.moveBy(-i,0);
}
}
}
}
function shake_y(n) {
if (self.moveBy) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
self.moveBy(0,i);
self.moveBy(0,-i);
}
}
}
}
//-->
</SCRIPT>
Then for the button you can do this:

on (release){
getURL (&quot;javascript:shake_x(5)&quot;);
}
That should work!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top