Hi - I was hoping somebody could point me in the right direction with this
question which has been killing me.  I'm using Flex Builder 3.

I've loaded a jpeg into an mx:image control, with proportions constrained
and the percentWidth set to 100 e.g.:

var thisImg:Image = new Image();
thisImg.src = "http://www.hv.com/img/myImage.jpg";
thisImg.percentWidth = 100;

When the image is first loaded and I check the height/width dimensions, I
will correctly get the dimensions of the original jpg image.  Say: the
original jpg dimensions are 1200x900.

My question is how do I get the correct height/width for the image contents
when it resizes and scales?  e.g. If the app gets smaller, and my jpg
resizes down to 900 x 600.  When I check thisImg, even though the jpg height
has changed to 600, the height of thisImg remains at 900.

I've tried checking thisImg.height, thisImg.contentHeight and
thisImg.content.height.  All the same.  They seem to be giving me the height
of the mx:image container but what I really want to know is the height of
the actual scaled image inside the container.

I'm really confused and frustrated, could anybody help me out?

Thanks in advance for your kind help!!!



jk

Reply via email to