title: How to rotate image from cameraUI for iOS in actionscript 3.0
body: <p>I'm building an App with actionscript 3.0 in my Flash builder. This is a followup question to <a href="https://stackoverflow.com/questions/14740323/how-to-upload-a-picture-image-from-iphone-to-app-in-actionscript-3">this question</a>, It works but when I take the picture, the image comes out rotated to the left. how can I check which way the user is holding the phone? and then what code do I use to rotate the image to it's corresponding place?</p>
  
  <p>Thanks in advanced!</p>
  
  <p><strong>EDIT:</strong>
  I'm using this code to rotate the image, but it seems to only rotate the image being displayed not the image file, any ideas?</p>
  
  <pre><code>var mat:Matrix = new Matrix();
  mat.translate(-W/2, -H/2);
  mat.rotate(Math.PI/2);
  mat.translate(+W/2, +H/2);
  mat.concat(myObj.transform.matrix);
  myObj.transform.matrix = mat;
  </code></pre>
  
  <p>~Myy</p>