322 Chapter 12: ActionScript Dictionary
Description
Event handler; invoked when the camera starts or stops detecting motion. If you want to respond
to this event handler, you must create a function to process its
activity value.
To specify the amount of motion required to invoke
Camera.onActivity(true) and the
amount of time that must elapse without activity before invoking
Camera.onActivity(false),
use
Camera.setMotionLevel().
Example
The following example displays true or false in the Output panel when the camera starts or
stops detecting motion.
// Assumes a Video object named "myVideoObject" is on the Stage
my_cam = Camera.get();
myVideoObject.attachVideo(my_cam);
my_cam.setMotionLevel(10, 500);
my_cam.onActivity = function(mode)
{
trace(mode);
}
See also
Camera.onActivity
, Camera.setMotionLevel()
Camera.onStatus
Availability
Flash Player 6.
Usage
active_cam.onStatus = function(infoObject) {
// your statements here
}
Parameters
infoObject
A parameter defined according to the status message.
Returns
Nothing.
Description
Event handler; invoked when the user allows or denies access to the camera. If you want to
respond to this event handler, you must create a function to process the information object
generated by the camera.
When a SWF file tries to access the camera, Flash Player displays a Privacy dialog box that lets the
user choose whether to allow or deny access.