EasyManua.ls Logo

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE - Quality (Camera.quality Property)

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
1378 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
398 ActionScript classes
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)
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
my_video.
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);

Table of Contents

Related product manuals