Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Code Gallery (https://forums.graalonline.com/forums/forumdisplay.php?f=179)
-   -   Simple Multi-Touch Demo (https://forums.graalonline.com/forums/showthread.php?t=134257507)

fowlplay4 12-31-2009 01:56 AM

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.

http://img705.imageshack.us/img705/4364/demog.png

Loriel 12-31-2009 02:07 AM

Thanks for posting this, this is v. interesting

coreys 12-31-2009 03:36 AM

Technically speaking, you don't just need an iPhone/iPod to use multi-touch. Macbooks have had em for awhile (ew) and now Windows 7 supports it so I imagine there are some PCs that have it out there as well, so this is a good time for this kind of thing to be understood. :)

12171217 12-31-2009 04:31 AM

Quote:

Originally Posted by coreys (Post 1547985)
Technically speaking, you don't just need an iPhone/iPod to use multi-touch. Macbooks have had em for awhile (ew) and now Windows 7 supports it so I imagine there are some PCs that have it out there as well, so this is a good time for this kind of thing to be understood. :)

The client probably doesn't have an interface to communicate with the Windows 7 or Macbook support.

Tigairius 07-28-2010 05:23 PM

Thanks for posting this. May turn out to be pretty helpful to me.

cbk1994 07-28-2010 05:28 PM

Quote:

Originally Posted by coreys (Post 1547985)
Technically speaking, you don't just need an iPhone/iPod to use multi-touch. Macbooks have had em for awhile (ew) and now Windows 7 supports it so I imagine there are some PCs that have it out there as well, so this is a good time for this kind of thing to be understood. :)

MacBooks have multi-touch trackpad support. In other words, you can't have two "mice" like you can on an iPhone. The only use for multi-touch on a MacBook right now is gestures (and they work quite well).


All times are GMT +2. The time now is 01:28 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.