onStatus (Camera.onStatus handler)

onStatus = function(infoObject:Object) {}

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.

To determine whether the user has denied or allowed access to the camera without processing this event handler, use the Camera.muted property.

Note: If the user chooses to permanently allow or deny access for all SWF files from a specified domain, this handler is not invoked for SWF files from that domain unless the user later changes the privacy setting. For more information, see Camera.get().

Availability: ActionScript 1.0; Flash Player 6

Parameters

infoObject:Object - A parameter defined according to the status message.

Example

The following ActionScript is used to display a message whenever the user allows or denies access to the camera:

var my_cam:Camera = Camera.get();
var my_video:Video;
my_video.attachVideo(my_cam);
my_cam.onStatus = function(infoObj:Object) {
    switch (infoObj.code) {
    case 'Camera.Muted' :
    trace("Camera access is denied");
    break;
    case 'Camera.Unmuted' :
    trace("Camera access granted");
    break;
    }
}

See also

get (Camera.get method), muted (Camera.muted property), showSettings (System.showSettings method), onStatus (System.onStatus handler)


Flash CS3