Height (Camera.height Property) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

Returns
- If
is not specified, this method returns a reference to the default camera or, if
Camera
index
it is in use by another application, to the first available camera. (If there is more than one
camera installed, the user may specify the default camera in the Flash Player Camera Settings
panel.) If no cameras are available or installed, the method returns
this method returns a reference to the requested camera, or
Example
The following example lets you select an active camera to use from a ComboBox instance.
The current active camera is displayed in a Label instance. 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
instance name camera_lbl, and a ComboBox component instance and give it the instance
name
. Then add the following ActionScript to Frame 1 of the Timeline:
cameras_cb
var my_cam:Camera = Camera.get();
var my_video:Video;
my_video.attachVideo(my_cam);
var camera_lbl:mx.controls.Label;
var cameras_cb:mx.controls.ComboBox;
camera_lbl.text = my_cam.name;
cameras_cb.dataProvider = Camera.names;
function changeCamera():Void {
my_cam = Camera.get(cameras_cb.selectedIndex);
my_video.attachVideo(my_cam);
camera_lbl.text = my_cam.name;
}
cameras_cb.addEventListener("change", changeCamera);
camera_lbl.setStyle("fontSize", 9);
cameras_cb.setStyle("fontSize", 9);
See also
index (Camera.index property)
(Camera.names property)
(Camera.setMode method)
attachVideo (Video.attachVideo method)

height (Camera.height property)

public height : Number [read-only]
The current capture height, in pixels. To set a value for this property, use
Availability: ActionScript 1.0; Flash Player 6
. Add a Label component instance to the Stage and give it the
,
muted (Camera.muted property)
,
onStatus (Camera.onStatus handler)
,
showSettings (System.showSettings method)
. If
null
index
if it is not available.
null
,
names
,
setMode
Camera.setMode()
Camera
is specified,
,
.
389

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF