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
YAHOO! GROUPS LINKS
|
- RE: [flexcoders] Flex 2: determine scaled dimensions of Load... Matt Chotin
-