User Guide
Camera 395
name (Camera.name property)
public name : String [read-only]
A string that specifies the name of the current camera, as returned by the camera hardware.
Availability: ActionScript 1.0; Flash Player 6
Example
The following example displays the name of the default camera in a text field. In Windows,
this name is the same as the device name listed in the Scanners and Cameras Control Panel.
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. 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);
this.createTextField("name_txt", this.getNextHighestDepth(), 0, 0, 100,
22);
name_txt.autoSize = true;
name_txt.text = 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
get (Camera.get method), names (Camera.names property)
names (Camera.names property)
public static names : Array [read-only]
Retrieves an array of strings reflecting the names of all available cameras without displaying
the Flash Player Privacy Settings panel. This array behaves in the same way as any other
ActionScript array, implicitly providing the zero-based index of each camera and the number
of cameras on the system (by means of
Camera.names.length). For more information, see
the
Camera.names Array class entry.