Macromedia flash media server 2-client-side actionscript language reference for flash media server 2 Benutzerhandbuch

Seite von 156
Camera class
25
Camera.name
Availability
Flash Player 6.
Flash Media Server (not required).
Usage
public name : String [read-only]
Description
Property (read-only); a string that specifies the name of the current camera, as returned by the 
camera hardware.
Example
The following example displays the name of the default camera in a text field and writes the 
name to the log file. In Windows, this name is the same as the device name listed in the 
Camera Settings 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 v2 component (version 2 of the Macromedia 
Component Architecture), use the DepthManager class from the component framework 
instead of the 
MovieClip.getNextHighestDepth()
 method. 
See also