
These are some experiments me, Jon Howard, and did for hackday, it turned out to be hackhours as we talked and ate pizza for most of the day.
DISCLAIMER: All this code was based on Jon Howards examples, the man is a genius, whenever i’m down in london I make sure I pop by to see whatever he’s been working on last,
last time it was a small movie of his kid running behind a tree in a forest, no biggie right, then he starts panning in 3D.
.
.
I’ve cleaned up the code, basically the idea was to create 3 flash appilcations which would sit on a website and provide the following apis for the javascript on the html page. All the setup for the webcam was to be one line of code.
here’s what we came up with…
BUTTON WEBCAM API


source and api docs here
1. Nudge API this was for buttons hit by the person on the webcam:
callback_obj.onWebcamNudgeUp(NUDGE_DIRECTION_CONSTANTS)
callback_obj.onWebcamNudgeDown(NUDGE_DIRECTION_CONSTANTS)
.
MOUSE WEBCAM API
Would of put pictures for the demos did i mention the lack of webcam/Admin Rights I’ve been having
1 pointer demo multi pointer demo source and api docs here
2. Mouse API this was for objects moved by the person on the webcam (it would try to find a finger and follow it):
onWebcamPointerMove(x:Number,y:Number, pointer_index:Number)
.
MINORITY REPORT 2 HANDED MOUSE WEBCAM API
here’s a link to jon’s excellent example, didn’t quite manage to get this one done… demo1 demo2
And lastly the ambious minority report style where the code would try to understand where hands are, and we they are crasped together for the onDown and apart for the onUp:
onWebcamGrabMove(x:Number,y:Number)
onWebcamGrabUp()
onWebcamGrabDown()
.
I would of done more cleanup but due to the unique way the IT is setup in PQ, I can’t install a webcam to continue my experiments… alas the pictures/demo movies taken are from a macbook plugged in under someone’s desk (don’t ask)
The “HTML with SWF — through Localconnection To —> HTML with SWF — external interface —> JS on same HTML Page” examples included in source
source and api docs here
Ant