# Multiple Camera instances at different resolutions

**URL:** https://forum.kirupa.com/t/multiple-camera-instances-at-different-resolutions/259966
**Category:** flash
**Created:** [May 11, 2008, 12:29am UTC](https://forum.kirupa.com/t/multiple-camera-instances-at-different-resolutions/259966 "2008-05-11T00:29:42Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![ignitrix](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ignitrix/32/2664_2.png) [@ignitrix](https://forum.kirupa.com/u/ignitrix)
#### Post date: [May 11, 2008, 12:29am UTC](https://forum.kirupa.com/t/multiple-camera-instances-at-different-resolutions/259966/1 "2008-05-11T00:29:42Z")

</div>

Can you have multiple flash.media.Camera instances running at different resolutions? Take the following code for example:

[AS]\_camSmall = Camera.getCamera();  
\_camSmall.setMode(320, 240, 30);  
\_videoSmall = new Video(\_camSmall.width, \_camSmall.height);  
\_videoSmall.attachCamera(\_camSmall);  
\_videoSmall.x = 0;  
\_videoSmall.y = 0;  
this.addChild(\_videoSmall);

\_camLarge = Camera.getCamera();  
\_camLarge.setMode(640, 480, 30);  
\_videoLarge = new Video(\_camLarge.width, \_camLarge.height);  
\_videoLarge.attachCamera(\_camLarge);  
\_videoLarge.x = \_camSmall.width;  
\_videoLarge.y = 0;  
this.addChild(\_videoLarge);[/AS]

Both video feeds are properly displayed, however both of them are displayed at 320x240 instead of the first at 320x240 and the second at 640x480 (note that if I change the first one to 640x480 then they both properly display at 640x480). The problem seems to be only if I try to run the two feeds at two different resolutions. Is this not possible?

---

<div class="post-metadata">

### Author: ![ignitrix](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ignitrix/32/2664_2.png) [@ignitrix](https://forum.kirupa.com/u/ignitrix)
#### Post date: [May 11, 2008, 12:32am UTC](https://forum.kirupa.com/t/multiple-camera-instances-at-different-resolutions/259966/2 "2008-05-11T00:32:22Z")

</div>

Apparently, you can’t change the resolution of the video feed at all once you set initially. In the following code, I add a single video feed, and sometime later after this video feed is running, I take it all down, clean it up, change the resolution, and try to get everything up and running again:

[AS]\_camSmall = Camera.getCamera();  
\_camSmall.setMode(320, 240, 30);  
\_videoSmall = new Video(\_camSmall.width, \_camSmall.height);  
\_videoSmall.attachCamera(\_camSmall);  
\_videoSmall.x = 0;  
\_videoSmall.y = 0;  
this.addChild(\_videoSmall);

// Sometime later during code execution  
this.removeChild(\_videoSmall);  
\_videoSmall = null;  
\_camSmall = Camera.getCamera();  
\_camSmall.setMode(640, 480, 30);  
\_videoSmall = new Video(\_camSmall.width, \_camSmall.height);  
\_videoSmall.attachCamera(\_camSmall);  
\_videoSmall.x = 0;  
\_videoSmall.y = 0;  
this.addChild(\_videoSmall);[/AS]

Although the feed does properly reappear, it’s at the resolution of the first feed. No change occurred! Lame…
