2 Replies Latest reply on May 1, 2008 11:36 AM by Ansury

    How to center image in canvas

    Frederic Laruelle
      Having trouble with centering variable size images inside a canvas.
      As i understand it, centering can be done by setting .x and .y coordinates,
      however I am unable to access the actual width and height of the images in order to calculate the proper coordinates for centering.
      I have tried all available width or height properties, and none of them seem to return the actual values after resizing...
      I either get 0, NaN or the fixed value i have set it to.

      Any ideas?