Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: Game

  1. #1
    New to the CF scene
    Join Date
    Apr 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Game

    Hey since my total knowledge of cooding if limited, so i was wondering, If some one could designe me a simple game that i require for shcool. it be a game board with little peons and a yes or No botton clicking yes makes the guy moves forward and no makes him moves backwards and shows a picture of someone doing a simple exerscise like push ups


    thank you so much if do take this

  • #2
    Regular Coder Rappa's Avatar
    Join Date
    Nov 2005
    Location
    LI
    Posts
    356
    Thanks
    21
    Thanked 9 Times in 9 Posts
    Thats not simple.

  • #3
    Regular Coder
    Join Date
    Jun 2007
    Location
    USA
    Posts
    527
    Thanks
    26
    Thanked 74 Times in 72 Posts
    Here . . .

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <title>Elite Webpage</title>
    </head>
    <body><div>
    
    <input type="button" value="Yes" onclick="forward();" />
    <input type="button" value="No" onclick="backward();" />
    
    <img id="peon" src="http://www1.theforce.net/jc/icons/collecting/wampa_toy.gif" alt="peonImg"
      style="position: absolute; top: 100px; left: 250px;"
      />
    
    <img id="workout" src="http://tbn0.google.com/images?q=tbn:0-nm-K8sv0ckeM:http://static.howstuffworks.com/gif/total-body-workout-routine-1.jpg" alt="workoutImg"
      style="position: absolute; top: 100px; left: 400px; visibility: hidden;"
      />
    
    <script type="text/javascript">
    
    function forward() {
      var s = document.getElementById("peon").style;
      s.top = parseInt(s.top) + 10 + "px";
    }
    
    function backward() {
      clearTimeout(backward.tim);
      var s = document.getElementById("peon").style;
      s.top = parseInt(s.top) - 10 + "px";
      s = document.getElementById("workout").style;
      s.visibility = "visible";
      backward.tim = setTimeout(function() {
        s.visibility = "hidden";
      }, 1500);
    }
    
    </script>
    </div>
    </body>
    </html>
    Last edited by Trinithis; 12-14-2007 at 05:54 PM. Reason: removed link

  • #4
    New to the CF scene
    Join Date
    Dec 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Why are you hotlinking to my my site? The link:

    <img id="workout" src="http://lensaunders.com/jday/images/pigjj.gif" alt="workoutImg"

    in your coding above states this. Please remove this link immediately if you are still using it.


  •  

    Posting Permissions

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