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

Seite von 156
38
Client-Side ActionScript Language Reference
See also
Camera.width
Availability
Flash Player 6.
Flash Media Server (not required).
Usage
public width : Number [read-only]
Description
Property (read-only); the current capture width, in pixels. To set a desired value for this 
property, use 
Example
The following code displays the current width, height and FPS of a video instance in a Label 
component instance on the Stage. 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 
dimensions_lbl
. 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);
var dimensions_lbl:mx.controls.Label;
dimensions_lbl.setStyle("fontSize", 9);
dimensions_lbl.setStyle("fontWeight", "bold");
dimensions_lbl.setStyle("textAlign", "center");
dimensions_lbl.text = "width: "+my_cam.width+", height: "+my_cam.height+", 
FPS: "+my_cam.fps;
See also
Microphone class
Availability
Flash Player 6.
Flash Media Server (not required).