>
Camera.getCamera(name) does not work in AS3
Welcome, Guest

by pooja on Thursday, 14 May 2009
Camera.getCamera(name) does not work in AS3


In AS3, if you want to attach multiple cameras using Camera.getCamera(name) you can't do so as Camera.getCamera(name) does not seem to work.
However, Camera.getCamera() works fine but it attaches the default camera. But if you want to specify a specific camera to be attached, it does not behave as expected.

var cameranames:Array = Camera.names;
var cam:Camera = Camera.getCamera(cameranames[0]);

cameranames Array gives the names of the cameras detected, but Camera.getCamera(cameranames[0]) returns a null.

Solution for this problem is that you need to pass the index of its position in the Camera.names array instead of the name to getCamera. And the index should be passed as a string. So, the following code will work:


var camera1:Camera = Camera.getCamera("0");

var camera2:Camera = Camera.getCamera("1");



Blogger Image
My Blog Title

Product Engineering, software engineering company, Product Development, Product Migration, Product Re-engineering, Product Maintenance, Product Testing Commercial Application Development, Business Software development, commercial software for startups, Application Support and Maintenance, software testing Product Maintenance, Outsource product maintenance, product support and maintenance Product Migration, Product Re-engineering, product re-engineering services Product Research, Product Engineering, UI Prototyping Services Software Testing Services, Quality Assurance services, professional software testers, Load Testing, Functional Testing, Cross Platform, Browser Testing, Test Automation, Testing Tools, software quality analysis Functional Testing Services, software quality analysis, Software Testing Services, Application Testing Services, Functional Testing Types Automated Testing, Automated Testing Services, automation testing, test script development, Automation Test Tools, outsource automation testing Load Testing, Performance Testing Services, Load Testing Tools Offshore Software Development, Outsource software services, offshore outsourcing services, offshore software development services, IT outsourcing services, software quality assurance services, Offshore IT services, Custom Application Development Services, Offshore Product Engineering Benefits of IT Outsourcing, Offshore Software Development companies, offshore software development firms Outsource planning, IT outsourcing, IT development services, offshore IT companies, offshore software development Offshore Software Development, Outsource software services, offshore outsourcing services, offshore software development services, IT outsourcing services, software quality assurance services, Offshore IT services, Custom Application Development Services, Offshore Product Engineering Offshore Software Development, Outsource software services, offshore outsourcing services, offshore software development services, IT outsourcing services, software quality assurance services, Offshore IT services, Custom Application Development Services, Offshore Product Engineering