私のコードがiPad3iOS6で機能しない理由、またはAdobe Airのバグですか?
次のコードは、iOS5を搭載したiPad1およびiPad2で機能します
if (startOrientation == StageOrientation.DEFAULT || startOrientation == StageOrientation.UPSIDE_DOWN){
stage.setOrientation(StageOrientation.ROTATED_RIGHT);}
else{
stage.setOrientation(startOrientation);
}
stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGING, orientationChangeListener);
private function orientationChangeListener(e:StageOrientationEvent):void{
txt_rotate.text = 'Camed' + StageOrientation.ROTATED_LEFT;
if (e.afterOrientation == StageOrientation.DEFAULT || e.afterOrientation == StageOrientation.UPSIDE_DOWN){
e.preventDefault();
}else if(e.afterOrientation == StageOrientation.ROTATED_LEFT){
_stageOrientation = 'ROTATED_LEFT';
txt_rotate.text = _stageOrientation;
}else if(e.afterOrientation == StageOrientation.ROTATED_RIGHT){
_stageOrientation = 'ROTATED_RIGHT';
txt_rotate.text = _stageOrientation;
}
}