1 Reply Latest reply on Jan 14, 2008 8:08 AM by shapeshifta78

    Determining Image Size

    shapeshifta78
      Hi there,
      I have a tilelist with images from flickr. if you click on one of them, they open up in a popup.
      I would like to determine the size of the big image and use a slider to scale it.
      It seems as if the size is set to zero every time I try to scale it and so the image disappears when using the slider.

      quote:

      <mx:VBox width="100%" verticalCenter="0">
      <mx:Image id="bigPic" source="{picURL}"
      creationComplete="imageWidth=bigPic.width; imageHeight=bigPic.height;"/>
      </mx:VBox>

      private function changeSize():void
      {
      //scale image with slider
      bigPic.width=uint(imageWidth*hSlider.value/100);
      bigPic.height=uint(imageHeight*hSlider.value/100);
      }

      Help, please!