フラッシュ ビルダー 4.5 と AS3 を使用して、ライブ JSON データ ソースから画像を動的に読み込みます。そのロードと正常に動作し、私のスワイプジェスチャに応答します(左スワイプで戻る、右スワイプで次の画像に進みます)...
画像が正常に読み込まれた後に画像の向きを検出するためのアクション スクリプトを追加し、垂直方向の写真の場合は、ステージを 90 度回転させます (そして、その「回転状態」であることを記憶するために何らかの種類のフラグを設定します)。
どうすればこれを達成できますか?
if (myPic && myPic.width > myPic.height)
{
// this picture is horizontal, so leave stage in normal landscape aspect ratio
} else {
// something here to take the stage and rotate it 90 degrees
}