|
May 30, 2000 Implementing Quaking Windows Tips: May 2000
Yehuda Shiran, Ph.D.
|
|
Another way to grab your visitors' attention is to make your window quaking and shaking. Click the following button to start the quake: If quakes make you feel sick, click the following button to stop: The jump() method returns a random integer from -maxShift to maxShift. The following code segment is responsible for a single quake:
Since we have no way of knowing the window's initial position, we must keep track of how much we moved it in each direction. The
The
The script generates a series of earthquakes. It begins when the page loads ( See the full script in Tutorial 1, Working with Windows.
People who read this tip also read these tips: Look for similar tips by subject: |