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)
(System.showSettings method)
quality (Camera.quality property)
public quality : Number [read-only]
An integer specifying the required level of picture quality, as determined by the amount of
compression being applied to each video frame. Acceptable quality values range from 1
(lowest quality, maximum compression) to 100 (highest quality, no compression). The default
value is 0, which means that picture quality can vary as needed to avoid exceeding available
bandwidth.
Availability: ActionScript 1.0; Flash Player 6
Example
The following example uses a NumericStepper instance to specify the amount of compression
applied to the camera feed. Create a new video instance by selecting New Video from the
Library options menu. Add an instance to the Stage and give it the instance name
Add a NumericStepper with the instance name quality_nstep. Then add the following
ActionScript to Frame 1 of the Timeline:
var quality_nstep:mx.controls.NumericStepper;
var my_cam:Camera = Camera.get();
var my_video:Video;
my_video.attachVideo(my_cam);
398
ActionScript classes
,
muted (Camera.muted property)
,
onStatus (System.onStatus handler)
,
showSettings
my_video
.
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?
Questions and answers