# How to select different web cams with getCamera()

**URL:** <https://forum.kirupa.com/t/how-to-select-different-web-cams-with-getcamera/228989>\
**Category:** flash\
**Created:** [June 13, 2007, 5:43am UTC](https://forum.kirupa.com/t/how-to-select-different-web-cams-with-getcamera/228989 "2007-06-13T05:43:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![waffe](https://avatars.discourse-cdn.com/v4/letter/w/c37758/32.png) [@waffe](https://forum.kirupa.com/u/waffe)\
**Post date:** [June 13, 2007, 5:43am UTC](https://forum.kirupa.com/t/how-to-select-different-web-cams-with-getcamera/228989/1 "2007-06-13T05:43:44Z")

</div>

Hi,

I am building a flash video surveillance app and I have ran into difficulty selecting between two different cams attached to my computer.

I am using AS3 to select a cam:

```auto

aCameras[CameraNum] = Camera.getCamera();

```

The above code always selects the default cam.

So I have used the “names” property of cams like this:

```auto

var tempCam:String = Camera.names[CameraNum]
aCameras[CameraNum] = Camera.getCamera(tempCam);

```

The above code does not work!

Does anyone know how this is done?

Thanks,

waffe
