contentHeight and contentWidth is returning the original values 50, 50. So it is a bug, I'll file one.
 
Thanks Tom,
-sam

 
On 3/3/06, Matt Chotin <[EMAIL PROTECTED]> wrote:

I believe that contentWidth/Height are supposed to return the scaled values, not the original values.  So that might be a bug.  I'll forward this on and see if anyone knows anything.

 


From: [email protected] [mailto:[email protected]] On Behalf Of Tom Bray
Sent: Thursday, March 02, 2006 10:57 AM
To: [email protected]
Subject: [flexcoders] Flex 2: determine scaled dimensions of Loader content?

 

Say you do this:

<mx:Loader  id="photo" source="image.jpg" width="200" height="150" scaleContent="true"/>

And the actual dimensions of image.jpg is 50x50.  After the loader has loaded the image and scaled it, the loader's contentWidth and contentHeight say 50, but the image has been scaled to fit in the loader and maintain the correct aspect ratio.  So, is there a property that contains the scaled width and height (150x150) or do I have to calculate it?

I want the scaled dimensions so that I can size a canvas around the image with a border and a dropshadow.

Thanks,

-Tom



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to