si te entendi es esto ....
Código :
import flash.display.*;
import flash.geom.*;
cam = Camera.get();
vid.attachVideo(cam);
now = new BitmapData(cam.width, cam.height);
before = new BitmapData(cam.width, cam.height);
rect = new Rectangle(0, 0, cam.width, cam.height);
pt = new Point(0, 0);
_onEnterFrame = function () {
if (!cam.muted) {
now.draw(vid);
now.draw(before, new Matrix(), new ColorTransform(), 'difference');
now.threshold(now, rect, pt, '>', 0xff111111, 0xffffffff);
before.draw(vid);
var val = now.getPixel(impact._x, impact._y);
var val2 = now.getPixel(impact2._x, impact2._y);
if (val>10000000 || val2>10000000) {
tt.text = "LORENA JAJAJA";
impact._alpha = 20;
impact2._alpha = 20;
my_sound.start();
} else {
impact._alpha = 100;
impact2._alpha = 100;
tt.text = "...";
}
}
};
inter = setInterval(this, "_onEnterFrame", 50);
var mc:MovieClip = this.createEmptyMovieClip("mc", this.getNextHighestDepth());
mc.attachBitmap(now, 10);
mc._visible = false;
mc._x = 160;
this.attachMovie("impact", "impact", this.getNextHighestDepth(), {_x:10, _y:10});
impact.duplicateMovieClip("impact2", 25, {_x:130});
var my_sound:Sound = new Sound(this);
my_sound.attachSound("bip");
my_sound.setVolume(10);
this.onMouseDown = function() {
mc._visible = !mc._visible;
};
oye tueres LOERNA FLASH .... por algun arazon estudias en LA Univ. EAFIT de Medellin