Results 1 to 3 of 3

Thread: Question.

  1. #1
    Junior Member
    Join Date
    Jun 2004
    Posts
    17

    Question.

    Hello, i was just playing with the old AO toys.
    (Hacker Hangman, BattleShip, 8-Ball etc).
    http://www.antionline.com/tools-and-...?action=answer
    Anyhow with the 8-ball when you type in your question then press submit the screen shakes..
    Now here's my question how is the screen made to shake, and does anyone know the code to make this happen.
    And if so would they be willing to share this code?

    The reason i am asking this, is because i'd like to add this type of effect to my website, for instance if a person clicked on a link, then the screen would shake then they would be taken to the appropriate page..

    Thankyou
    1+1=2
    Math\'s teacher at day.
    ub3r l337 g33k at night.
    What a complicated life indeed.

  2. #2
    Senior Member
    Join Date
    Jul 2003
    Posts
    634
    A search on google for "screen shake java script" turner up ~ 6,160 in 0.35 seconds, pretty cool hey?

    heres some code.

    Code:
    <!-- TWO STEPS TO INSTALL SHAKE SCREEN:
    
      1.  Copy the coding into the HEAD of your HTML document
      2.  Add the last code into the BODY of your HTML document  -->
    
    <!-- STEP ONE: Paste this code into the HEAD of your HTML document  -->
    
    <HEAD>
    
    <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>
    </HEAD>
    
    <!-- STEP TWO: Copy this code into the BODY of your HTML document  -->
    
    <BODY>
    
    <center>
    <form>
    <input type=button onClick="shake(2)" value="Shake Screen">
    </form>
    </center>
    
     
    
    <!-- Script Size:  1.09 KB -->
    it was found at http://www.itechcentral.net/java/Bac...ke-screen.html

    i2c

  3. #3
    Junior Member
    Join Date
    Jun 2004
    Posts
    17
    Thank you i2c, very much appreciated your help was.
    Many good wishes for helping me.

    cheers
    1+1=2
    Math\'s teacher at day.
    ub3r l337 g33k at night.
    What a complicated life indeed.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •