Announcement

Collapse
No announcement yet.

New Scrolling Method

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • New Scrolling Method

    Is there a way, whether in PHP or Java (or both) to make it so that when you click and hold the left mouse button, when you move the mouse, it will scroll up or down. Like in game Black & White where you have to click and hold to move, but just for up and down

  • #2
    PHP is a server side language, so you can't with it. I believe Java is used for applets or sumthin, I'm not sure if you could with it.

    I'm sure you could do something in JavaScript. I did something similar in a Visual Basic application I wrote. Basic concept (psuedocode):
    Code:
    onLoad {
        var Move = 0
    }
    onMouseDown {
        Move = 1
    }
    onMouseMove {
        if ( Move == 1) {
            // compare current X,Y to previously stored X,Y
            // move the content by % based on mouse position
        }
        
        // keep track of the mouse position
        mouse_x = //current mouse x coordinate
        mouse_y = //current mouse y coordinate
    }
    onMouseUp {
        var Move = 0
    }

    Comment


    • #3
      If anyone is interested...

      The VB app I wrote is for people who like Case Mods. It allows you to control 'schtuff' (lights, fans, etc.) inside your machine... My cousin designs and builds the hardware, then I write the software.

      Linkage

      Comment


      • #4
        Oops, I mean't Javascript, anyways, thanks I'll try that code

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...
        X