Hi, all;

I have the situation where I have an image control I am using in a 
component.  I want the image to be able to be as big as it can up to 
the actual file size, so I have given the image control a width of 
100%, scalecontent = true, maintainaspectratio=true.  However, this 
is only _close_ to what I want it to do.  What I _actually_ want it 
to do is to scale the content only if the content needs to be scaled 
_down_ to fit in the container.  Otherwise, I want it to max out at 
the natural width of the image, so I don't get nasty pixellated 
images.  I've tried using this:

<mx:Image id="imgCtrl" maintainAspectRatio="true" 
source="{'images/'+_img}" 
                        scaleContent="true" height="100%" 
width="100%" 
                        maxWidth="{imgCtrl.measuredWidth}"
                        completeEffect="Fade"
                        verticalAlign="bottom" 
horizontalAlign="center" />

but the image fails to appear, presumably because somehow the 
measuredWidth is 0.

Any ideas?

Thanks;

Amy

Reply via email to