Flash Media Server |
|||
| Client-Side ActionScript Language Reference for Flash Media Server 2 > Client-Side ActionScript Language Reference > Camera class > Camera.onStatus | |||
public onStatus = function(infoObject:Object) {}
infoObject A parameter defined according to the status message. For more information about this parameter, see Camera information objects.
Nothing.
Event handler; invoked when one of the following events occurs:
false, and this handler is invoked with an information object whose code property is Camera.Unmuted.true, and this handler is invoked with an information object whose code property is Camera.Muted.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 |
If you want to respond to this event handler, you must create a function to process the information object generated by the camera. For more information, see Client-Side Information Objects.
The following event handler displays a message whenever the user allows or denies access to the camera:
// assumes 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);
Camera.get(), Camera.muted, System.showSettings()
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/fms/2/docs/00000542.html