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.
