1 Reply Latest reply on Jul 14, 2008 8:28 AM by cyber fyb

    How to show the photo with a decent size?

    cyber fyb Level 1
      Hi,

      I tried to used the example of pan/zoom from the Flex Store sample application ( http://www.adobe.com/devnet/flex/samples/fig_panzoom/) and everything work fine except that I am not able to fit the photo in a better size based on the with and height I fixed at 375 X 375. I have a bunch of thumbnails. When the user click on one of those thumbnails, a bigger photo appear in the middle of the screen where the user will have the possibility to zoom in and out. When the user click on a thumbnail, the system call a better version of the same image with high resolution (a photo can be W:1536 X H:2048). As I mentioned, I setup the imageViewer at 375 X 375 so I would like the photo to fit that size when loaded in the component imageViewer.

      In conclusion, I seems to miss how to activate the imageViewer to load with the bitmapScaleFactor of 0.17 (which fit ).


      If anybody can help me to figure out what is the thing I am missing here, it will make my week! ;-)
        • 1. Re: How to show the photo with a decent size?
          cyber fyb Level 1
          I found that placing the call function centerView() when the imageViewer's function handleLoadComplete is completed do the effect I was looking for. The function handleLoadComplete is inside the ImageViewer.as and is part of the original code. I guess the world map was not as big as the images I am trying to process so I never saw the same effect from the example. But by adding the caller for the function centerView() after the line _percentLoadedLabel.text = "Complete";, it does the job and everytime a new "large" image is processed (by clicking on is associated thumbnails), the function handleLoadComplete is running and finish by resizing the large image with a "decent" size to start (then the user will be able to zoom in).