Camera.onActivity
321
Camera.names
Availability
Flash Player 6.
Usage
Camera.names
Note:
The correct syntax is
Camera.names
. To assign the return value to a variable, use syntax like
cam_array
= Camera.names
. To determine the name of the current camera, use
active_cam
.name
.
Description
Read-only class property; retrieves an array of strings reflecting the names of all available cameras
without displaying the Flash Player Privacy Settings panel. This array behaves the same as any
other ActionScript array, implicitly providing the zero-based index of each camera and the
number of cameras on the system (by means of
Camera.names.length
). For more information,
see the
Array class
entry.
Calling the
Camera.names
property requires an extensive examination of the hardware, and it
may take several seconds to build the array. In most cases, you can just use the default camera.
Example
The following example uses the default camera unless more than one camera is available, in which
case the user can choose which camera to set as the default camera.
cam_array = Camera.names;
if (cam_array.length == 1){
my_cam = Camera.get();
}
else {
System.showSettings(3);
my_cam = Camera.get();
}
See also
Camera.get()
,
Camera.index
,
Camera.name
Camera.onActivity
Availability
Flash Player 6.
Usage
active_cam
.onActivity = function(
activity
) {
// your statements here
}
Parameters
activity
A Boolean value set to
true
when the camera starts detecting motion,
false
when
it stops.
Returns
Nothing.
Summary of Contents for FLASH MX 2004 - ACTIONSCRIPT
Page 1: ...ActionScript Reference Guide...
Page 8: ...8 Contents...
Page 12: ......
Page 24: ...24 Chapter 1 What s New in Flash MX 2004 ActionScript...
Page 54: ...54 Chapter 2 ActionScript Basics...
Page 80: ...80 Chapter 3 Writing and Debugging Scripts...
Page 82: ......
Page 110: ...110 Chapter 5 Creating Interaction with ActionScript...
Page 112: ......
Page 120: ...120 Chapter 6 Using the Built In Classes...
Page 176: ......
Page 192: ...192 Chapter 10 Working with External Data...
Page 202: ...202 Chapter 11 Working with External Media...
Page 204: ......
Page 782: ...782 Chapter 12 ActionScript Dictionary...
Page 793: ...Other keys 793 221 222 Key Key code...
Page 794: ...794 Appendix C Keyboard Keys and Key Code Values...
Page 798: ...798 Appendix D Writing Scripts for Earlier Versions of Flash Player...
Page 806: ...806 Appendix E Object Oriented Programming with ActionScript 1...
Page 816: ...816 Index...