ollydbg
ollydbg

Reputation: 3525

How to get all available cameras with actionscript?

I can get the default camera this way:

Camera.getCamera();

But how to get all available cameras connected to my computer with actionscript?

Upvotes: 3

Views: 1376

Answers (3)

Sean Fujiwara
Sean Fujiwara

Reputation: 4546

trace(Camera.names);

Don't you have code hinting?

Upvotes: -1

midhunhk
midhunhk

Reputation: 5554

You can use the Camera.names array to get the list of cameras supported on the system. Camera.getCamera() returns a reference to the default camera.

Using the Camera.names array, you can call Camera.getCamera(name:String = null) and pass the name of the camera to it. To specify a name, use the string representation of the zero-based index position within the Camera.names array. For example, to specify the third camera in the array, use Camera.getCamera("2").

More info : flash.media.Camera : Adobe Livedocs

Upvotes: 3

ocodo
ocodo

Reputation: 30289

Unfortunately only the selected camera (via Adobe Flash Player Settings) is available to ActionScript.

Upvotes: 0

Related Questions