prevent landscape
So I know that I can add this code to prevent portrait mode
import flash.display.StageOrientation;
var startOrientation:String = stage.orientation;
if (startOrientation == "default" || startOrientation == "upsideDown")
{
stage.setOrientation(StageOrientation.ROTATED_RIGHT);
}
else
{
stage.setOrientation(startOrientation);
}
stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGING, orientationChangeListener);
function orientationChangeListener(e:StageOrientationEvent)
{
if (e.afterOrientation == "default" || e.afterOrientation == "upsideDown")
{
e.preventDefault();
}
}
What is the landscape equivalent of preventDefault? I have cs5.5 so am using air 2.6. I know before there was a workaround where you could set the publish orientation to landscape but i assume you don't need to do this now?
