public onStatus = function(infoObject:Object) {}
Invoked when one of the following events occurs:
When a SWF file tries to access the camera, Flash Player displays a Privacy dialog box in which the user can 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.
If you want to respond to this event handler, you must create a function to process the information object generated by the camera.
Flash Media Server; Flash Player 6.
infoObject An object with code and level properties that provide information about the status of a Camera object, as follows:
|
code property |
level property |
Meaning |
|---|---|---|
|
Camera.Muted |
status |
The user denied access to a camera. |
|
Camera.Unmuted |
status |
The user granted access to a camera. |
The following event handler displays a message whenever the user allows or denies access to the camera:
// Assumes that a Video object named "my_video" is on the Stage.
var active_cam:Camera = Camera.get();
my_video.attachVideo(active_cam);
active_cam.onStatus = function(infoMsg) {
if(infoMsg.code == "Camera.Muted"){
trace("User denies access to the camera");
} else {
trace("User allows access to the camera");
}
}
// Change the Allow or Deny value to invoke the function.
System.showSettings(0);