VB icon

Browser window vibrator or Screen shaker

Email
Submitted on: 1/2/2015 10:37:00 AM
By: Ayman Elbanhawy (from psc cd)  
Level: Beginner
User Rating: By 11 Users
Compatibility: Java (JDK 1.1), Java (JDK 1.2)
Views: 1865
 
     This code will shake or vibrate the browser window. To see an example of what this code can do! go to http://www.imagineer-web.com/MasterKey/vibrate.htm
 

HTML:

Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
//**************************************
//HTML for :Browser window vibrator or Screen shaker
//**************************************
<body onLoad="vibrate(10)">
<!-- To see an example of what this code can do! go to
http://www.imagineer-web.com/MasterKey/vibrate.htm
-->
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
				
//**************************************
// Name: Browser window vibrator or Screen shaker
// Description:This code will shake or vibrate the browser window. 
To see an example of what this code can do! go to
http://www.imagineer-web.com/MasterKey/vibrate.htm
// By: Ayman Elbanhawy (from psc cd)
//
// Assumes:To see an example of what this code can do! go to
http://www.imagineer-web.com/MasterKey/vibrate.htm
Make sure you add the call vibrate(x)in your 
HTML body. For example onload = "vibrate(10)"
//**************************************

<!-- The following script vibrate the screen upon loading page -->
<!-- To see an example of what this code can do! -->
<!-- http://www.imagineer-web.com/MasterKey/vibrate.htm -->
<SCRIPT LANGUAGE="JavaScript1.2">
<!-- Begin
function vibrate(x)
 {
 if (parent.moveBy) {
 for (a = 10; a > 0; a--) {
for (b = x; b > 0; b--) {
parent.moveBy(0,-a);
parent.moveBy(-a,0); 
parent.moveBy(0,a);
parent.moveBy(a,0);
}
 }
 }
 }
// End of vibrate code --> 
</script>


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Beginner category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments


 There are no comments on this submission.
 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.