Camera.width - MACROMEDIA FLASH MX 2004-ACTIONSCRIPT LANGUAGE Reference

Actionscript language reference
Table of Contents

Advertisement

Camera.width

Availability
Flash Player 6.
Usage
active_cam.width:Number
Description
Read-only property; the current capture width, in pixels. To set a desired value for this property,
use
Camera.setMode()
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
a Label component instance to the Stage and give it the instance name
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.height,
Camera.setMode()
200
Chapter 2: ActionScript Language Reference
.
.
Camera.setMode()
. Add
my_video
. Then
dimensions_lbl

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash mx

Table of Contents