User Guide

Camera 391
cameras_txt.html = true;
cameras_txt.border = true;
cameras_txt.wordWrap = true;
cameras_txt.multiline = true;
for (var i = 0; i<Camera.names.length; i++) {
cameras_txt.htmlText += "<li><u><a
href=\"asfunction:changeCamera,"+i+"\">"+Camera.names[i]+"</a></u></
li>";
}
function changeCamera(index:Number) {
my_cam = Camera.get(index);
my_video.attachVideo(my_cam);
camera_lbl.text = my_cam.index+". "+my_cam.name;
}
The MovieClip.getNextHighestDepth() method used in this example requires Flash Player
7 or later. If your SWF file includes a version 2 component, use the version 2 components
DepthManager class instead of the
MovieClip.getNextHighestDepth() method.
See also
names (Camera.names property), get (Camera.get method)
motionLevel (Camera.motionLevel property)
public motionLevel : Number [read-only]
A numeric value that specifies the amount of motion required to invoke
Camera.onActivity(true). Acceptable values range from 0 to 100. The default value is 50.
Video can be displayed regardless of the value of the
motionLevel property. For more
information, see
Camera.setMotionLevel().
Availability: ActionScript 1.0; Flash Player 6
Example
The following example continually detects the motion level of a 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 Label component instance to the Stage
and give it the instance name motionLevel_lbl, a NumericStepper with the instance name
motionLevel_nstep, and a ProgressBar with the instance name motion_pb. Then add the
following ActionScript to Frame 1 of the Timeline:
var my_cam:Camera = Camera.get();
var my_video:Video;
my_video.attachVideo(my_cam);
// configure the ProgressBar component instance