Macromedia flash media server 2-client-side actionscript language reference for flash media server 2 ユーザーズマニュアル

ページ / 156
18
Client-Side ActionScript Language Reference
Camera.height
Availability
Flash Player 6.
Flash Media Server (not required).
Usage
public height : Number  [read-only]
Description
Property (read-only); the current capture height, in pixels. To set a 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 the example for 
.
See also
Camera.index
Availability
Flash Player 6.
Flash Media Server (not required).