свойство

Код AS3:
camera.muted

Код AS3:
// Imports
import flash.media.Camera;
import flash.media.Video;
import flash.events.MouseEvent;
// Variables
var _camera:Camera = null;
var _video:Video = null;
// Add available cameras to ComboBox
function displayAvailableCameras():void
{
// Loop thru cameras
for(var i:int = 0; i < Camera.names.length; i++)
{
// Add items
var cam:Camera = Camera.getCamera(String(i)) as Camera;
comboBox.addItem( { label:cam.name, data:cam.name } );
// Select selected value to “USB Video Class Video” if it exists
if(cam.name == “USB Video Class Video”) comboBox.selectedIndex = i;
}
}
// Check to see if there is a camera available and use it if available
function addCamera(e:MouseEvent):void
{
trace(“addCamera()”);
// Tell user something is happening
infoText.text = “Checking for a webcam”
// Webcam does not exists at all.
if (Camera.getCamera() == null)
{
trace(“You need a webcam”);
// Inform user that they need a webcam on their computer here
infoText.text = “Please connect a webcam”
}
// Webcam exists
else
{
trace(“You have a webcam.”);
// Set the desired camera by passing the selected index as a String
_camera = Camera.getCamera( String(comboBox.selectedIndex) );
// Display camera feed as a video
displayVideo();
}
}
// Display the video using the camera feed.
function displayVideo():void
{
trace(“displayVideo()”);
// Create video object
_video = new Video();
// Attach camera
_video.attachCamera(_camera);
// Add video to stage
addChild(_video);
}
// Show list of available cameras in ComboBox
displayAvailableCameras()
// Button functionality
checkButton.addEventListener( MouseEvent.CLICK, addCamera );
checkButton.buttonMode = true;