2 Replies Latest reply on Sep 9, 2007 12:51 PM by AdobeMe123

    How to get the image width and height OR a better way

    AdobeMe123
      Hello all.

      I have a Flash product rotator applet, coded in AS2. It is an applet that has a main picture and then thumbnails underneath. After I click on a thumbnail, I was wondering if I can obtain the height and width to process further. The processing further would be to center or left or right align the picture within the movie, based on its dimensions, within the document's dimensions. So, if I had a document size of 500 x 500, and the picture loaded was only 150 x 300, I need a way to center, left or right justify the picture within its document. I have tried the _height and _width params but they return the dimensions of the loaded movie and not the individual jpegs. I was thinking if I had the height and width, I could use some simple math to do this. Is there an easier way? I have added the AS2 code (which is from the first frame). It is based on the applet from http://flash-creations.com/notes/dynamic_slidingviewer.php.

      Any help would be greatly appreciated.

      Here is the code now: