Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6150421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:36:35+00:00 2026-05-23T19:36:35+00:00

I have a situation where I have to a have a few different sized

  • 0

I have a situation where I have to a have a few different sized “cameras” to send over a netstream depending on if its a desktop or mobile connected. Here’s how I have it setup:

protected var nearCam:Camera;
protected var nearCamForMobile:Camera;

nearCam = Camera.getCamera();
nearCam.setMode(385,240,10);
nearCam.setQuality(0,0);
//this is the cam I want to display on the near Side to show the user themselves.
near_video.attachCamera(nearCam);


//If a mobile user connects, I want to send them this resolution/aspect ratio of a camera so i'm just setting up this Camera but not showing it anywhere.         
nearCamForMobile = Camera.getCamera();
nearCamForMobile.setMode(480,800,10);
nearCamForMobile.setQuality(0,0);

So when a mobile user connected I’d just swap the camera that’s attached to the netstream to the mobile one so it looks good on their phone and not all stretched.

if(isFarMobile)
{
    sendStream.attachCamera(nearCamForMobile);
}
else
{
    sendStream.attachCamera(nearCam);
}

Now on to my problem….

If i do JUST the nearCamForMobile and send that to the mobile versaion it looks great on the phone and it’s not stretched. but then obviously its 480×800 resolution looks stretched on the desktop version which is a 385×240 video box. So if i do just the nearCam it looks great on the desktop but then it looks stretched on the mobile….

So what im curious is why Cant I do both vars the way I showed above, display the nearCam, and then have the nearCamForMobile waiting to be sent when i need it to?

Can you only have one camera mode setup at a time? Any ideas how I could do this? On the mobile version its setup so the user is holding the phone in potrait and its 840×480. The desktop site looks best when its like a widescreen video.

In the end I’m basically trying to figure out how to have 2 camera vars with 2 resolutions. Display 1 on the near side and attach the other to the netstream in a situation where the far is a mobile client. (I know how to figure out if the far is mobile, im not worried about that part)

I just need to be able to transmit a resolution/aspect ratio that looks good for a mobile client. which happens to be in a different aspect ratio than the desktop cleint.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T19:36:36+00:00Added an answer on May 23, 2026 at 7:36 pm

    Can’t be done. Check out this line specifically from the docs :

    “Multiple calls to the getCamera() method reference the same camera
    driver. Thus, if your code contains code like firstCam:Camera =
    getCamera() and secondCam:Camera = getCamera(), both firstCam and
    secondCam reference the same camera, which is the user’s default
    camera.”

    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/media/Camera.html#getCamera()

    So in other words, as soon as you get one, any subsequent get attempts will just be creating another pointer to the same object. Thus, you have two variables with a pointer to the same object. Setting a property on that pointer sets it to both.

    Make sense?

    Sorry for the bad news :\

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is the situation: I have a Mediawiki installation, and a few additional server-side
I have a situation where I need to generate a few similar anonymous delegates.
I have a simple situation. A large organisation is using several different versions of
I've got a situation where I have two different webapps running on a single
I know this question could have passed a few times here but I haven't
I have been in this situation quite a few times where visual studio does
I have few different applications among which I'd like to share a C# enum.
Situation: I have a few hundred posts each belonging to a particular category. A]
I have quite a few situations where I have database structures similar to: TABLE
i have situation like this: class IData { virtual void get() = 0; virtual

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.