3 Replies Latest reply on Aug 23, 2013 10:20 AM by Joel Bondoux

    Resize img keeping aspect ratio

    Joel Bondoux Level 1



      I am working on a project that has the stage and all contents resize to the browser size.  However, there is one logo that requires it keeps it's aspect ratio.  Curently it is positioned near centre of the stage but of course with it's width and height settings at % the logo looks great on a desktop 16:9 browser window but gets squashed in a mobile portrait view.


      Is there no way of assigning the image height as auto as you would do in standard css?


      OK, if the image was static on the stage I could give it a class and manipulate it in css outside of Animate (not tried it but the theory seems to make sense).  However, this logo gets moved to the top corner of the screen when other content is placed in the centre of the stage so in my mind the css short-cut wouldn't work.


      Are there some clever script tricks to resolve this.  It can't be an uncommon problem...?