Example
The following example sends messages to the Output panel when video activity starts or stops.
Change the motion sensitivity value of 30 to a higher or lower number to see how different values
affect motion detection.
// Assumes a Video object named "myVideoObject" is on the Stage
active_cam = Camera.get();
x = 0;
function motion(mode) {
trace(x + ": " + mode);
x++;
}
active_cam.onActivity = function(mode) {
motion(mode);
}
active_cam.setMotionLevel(30, 500);
myVideoObject.attachVideo(active_cam);
See also
Camera.activityLevel, Camera.motionLevel, Camera.motionTimeOut,
Camera.onActivity
Camera.setMotionLevel()
197
Need help?
Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?
Questions and answers