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(keymodmxmyclicksmouse) {
  
with (findimg(200 mouse)) {
    
mx 64;
    
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 
0red 1blue green 0; break;
      case 
1blue 1green red 0; break;
      case 
2green 1blue red 0; break;
      case 
3red green 1blue 0; break;
    }
  } 
}

function 
GraalControl.onMouseDragged(keymodmxmyclicksmouse) {
  
with (findimg(200 mouse)) {
    
mx 64;
    
my 64;
  } 
}

function 
GraalControl.onMouseUp(keymodmxmyclicksmouse) {
  
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