View Single Post
  #1  
Old 12-31-2009, 01:56 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Simple Multi-Touch Demo

I know this won't mean much right now since there's only a couple developers who can actually see/use it, but this is basically how it's working right now.

The current limitation on this script is that you can only drag one light at a time. So for instance if you move two fingers around only one of the lights will move.

PHP Code:
/*
   Simple Multi-Touch Demo
*/

//#CLIENTSIDE

function GraalControl.onMouseDown(keymod, mx, my, clicks, mouse) {
  
with (findimg(200 + mouse)) {
    
x = mx - 64;
    
y = my - 64;
    
image = "light2.png";
    
alpha = 0.99;
    
zoom  = 1.4;
    
layer = 4;
    
//I had a mod equation here, but the forums didn't like it.
    //temp.lightcolor = mouse [percent] 4;
    
temp.lightcolor = mouse;
    switch (
temp.lightcolor) {
      case 
0: red = 1; blue = green = 0; break;
      case 
1: blue = 1; green = red = 0; break;
      case 
2: green = 1; blue = red = 0; break;
      case 
3: red = green = 1; blue = 0; break;
    }
  } 
}

function 
GraalControl.onMouseDragged(keymod, mx, my, clicks, mouse) {
  
with (findimg(200 + mouse)) {
    
x = mx - 64;
    
y = my - 64;
  } 
}

function 
GraalControl.onMouseUp(keymod, mx, my, clicks, mouse) {
  
hideimg(200 + mouse);
} 
Anyway here's an image just to show what happens when you're touching it with four different fingers.

__________________
Quote:
Reply With Quote