Hi,
I'm using the devices camera and I want to use it in my app and have the app in portrait. The problems is that when I get the camera while the app is in portrait the camera is always rotated wrong. The camera's rotation is fine when using landscape.
Does anyone have any solutions?
Here is my code:
package
{
import flash.display.MovieClip;
import flash.media.Camera;
import flash.media.Video;
import flash.display.StageScaleMode;
import flash.display.StageAlign;
public class Main extends MovieClip
{
private var cam:Camera;
private var vid:Video;
public function Main()
{
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
cam = Camera.getCamera();
trace(Camera.names);
cam.setMode(stage.fullScreenWidth, stage.fullScreenHeight, 30);
trace("cam.width = " + cam.width);
trace("cam.height = " + cam.height);
vid = new Video(cam.width, cam.height);
vid.attachCamera(cam);
addChildAt(vid, 0);
}
}
}