Camera.quality
Availability
Flash Player 6.
Usage
active_cam.quality:Number
Description
Read-only property; 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.
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
NumericStepper with the instance name
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);
quality_nstep.minimum = 0;
quality_nstep.maximum = 100;
quality_nstep.stepSize = 5;
quality_nstep.value = my_cam.quality;
function changeQuality() {
my_cam.setQuality(my_cam.bandwidth, quality_nstep.value);
}
quality_nstep.addEventListener("change", changeQuality);
See also
Camera.setQuality()
. Then add the following ActionScript
quality_nstep
. Add a
my_video
Camera.quality
193
Need help?
Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?