Thread: webpage help

Results 1 to 10 of 10
  1. Collapse Details
    webpage help
    #1
    Charter Member phragle's Avatar
    Join Date
    Oct 2008
    Location
    Serious is the BOMB!
    Posts
    7,073
    anybody semi decent on making webpages?? Im doing a new project at school, and need to find the code or script to make something move when you point the mouse at it, so it 'dodges' the cursor preventing you from actually clicking on it.

    Thanks
    P-4077 "The Swamp" S.B.Y.C. and Michigan medboat mothership
    Reply With Quote
     

  2. Collapse Details
     
    #2
    Sponsor RPM's Avatar
    Join Date
    Nov 2008
    Location
    LOTO
    Posts
    797
    What do you mean Phragle.. Pretty much a roll over button
    Some days your the fist and some days your the face!
    Reply With Quote
     

  3. Collapse Details
     
    #3
    Charter Member phragle's Avatar
    Join Date
    Oct 2008
    Location
    Serious is the BOMB!
    Posts
    7,073
    RPM, I will send you a pm after class tonite. thanks.
    P-4077 "The Swamp" S.B.Y.C. and Michigan medboat mothership
    Reply With Quote
     

  4. Collapse Details
     
    #4
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
    <html lang="en-US">
    <head><title>Click the Button</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <script type="text/javascript"><!--
    function moveObj(obj){
    var w = 600, h = 400;
    newWidth = Math.floor(Math.random()*w);
    newHeight = Math.floor(Math.random()*h);
    obj.style.position="absolute";
    obj.style.left=newWidth+"px";
    obj.style.top=newHeight+"px";
    }
    function checkObj(event,obj){
    var top = obj.style.top.split("px")[0];
    var left = obj.style.left.split("px")[0];
    if(top+5 > event.y || left+5 > event.x){moveObj(obj);}
    }
    window.setTimeout("checkObj(event,document.forms[0].elements[0]", 1);
    document.onkeydown = function(){return false;}
    //--></script>
    </head>
    <body onMouseMove="checkObj(event,document.forms[0].elements[0]);" onKeyPress="return false;">
    <form action="" name="frm"><div>
    <input type="button" value="Click Me Phragle!" onMouseOver="moveObj(this);" onClick="alert('Good Job');">
    </div></form>
    </body></html>

    Test it here: http://jmarshall.com/easy/html/testbed.html
    Reply With Quote
     

  5. Collapse Details
     
    #5
    Charter Member phragle's Avatar
    Join Date
    Oct 2008
    Location
    Serious is the BOMB!
    Posts
    7,073
    ok, I have the code adjusted so the speed and movement is fluid and can be ajusted for the frame size (damn, it's been 10+ years since I have messed with code) can I change the input type to .gif the value= filename as long as it's in the same directory?? that tested ok with a bogus file name displaying a red X so I believe it will work???? thanks for the code..I searched for almost 2 hours trying to find it this afternoon.
    P-4077 "The Swamp" S.B.Y.C. and Michigan medboat mothership
    Reply With Quote
     

  6. Collapse Details
     
    #6
    Charter Member Sea-Dated's Avatar
    Join Date
    Oct 2008
    Location
    Tulsa, OK/GLOC
    Posts
    4,285
    Good work Mark.
    Reply With Quote
     

  7. Collapse Details
     
    #7
    You want the button to be the picture and when they onMouseOver it moves?

    That was kind of random- if it is a picture you may want to slow it down where it just bounces around to another spot vs shooting all over the place
    Reply With Quote
     

  8. Collapse Details
     
    #8
    Charter Member phragle's Avatar
    Join Date
    Oct 2008
    Location
    Serious is the BOMB!
    Posts
    7,073
    it's actually going to be a word, most likely in the form of a transparent .gif

    itt's a scool project like I said, so it's going to have a button of the side frame that says "find the truth" then opens up frame with work that says click on "truth" to learn more with a decent sized colotfull "truth" under that..so they go to click on it, but the truth avoids them by moving about the page.
    P-4077 "The Swamp" S.B.Y.C. and Michigan medboat mothership
    Reply With Quote
     

  9. Collapse Details
     
    #9
    Post Ho thread sounds like you got it done?
    Reply With Quote
     

  10. Collapse Details
     
    #10
    Charter Member phragle's Avatar
    Join Date
    Oct 2008
    Location
    Serious is the BOMB!
    Posts
    7,073
    Im getting close, still havent been able to test, won't start real construction untll this weekend. just trying to get the tools I will need.
    P-4077 "The Swamp" S.B.Y.C. and Michigan medboat mothership
    Reply With Quote
     

Posting Permissions

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