8 Replies Latest reply on Nov 27, 2011 10:51 AM by kglad

    Scale image strange problem

    aimaob

      Hi

       

      I have loaded an image using MovieClipLoader and am using the following code to scale it to fit a photo frame:

       

      var mcLoader:MovieClipLoader = new MovieClipLoader();

      ..

      ..  add listeners ...

       

      mcLoader.loadClip(filePath, frame.imageHolder);

       

      function loadInitEventHandler(target_mc:MovieClip):Void

      {

      var scale:Number = Math.min(frameWidth/target_mc._width * 100, frameHeight/target_mc._height * 100);

      target_mc._width = scale;

      target_mc._height = scale;

      }

       

      The code works for most of the images except images with resolution 2880 x 2880.  It did not scale properly - part of the image on the right does not show. Please see images below.  The lower image scaled properly, but the upper one did not.

       

      Gallery image problem - 28-11-2011 0-14-46.png

       

      The math seems to be correct and I do not know what the problem is.

       

      Any help is appreciated!

       

      Thanks in advance!