>       I hate the flex documentation...

Also, if there are specific problems with the documentation, please let
the doc team know by either posting to this list, adding a comment to
livedocs, or filing a bug at http://www.adobe.com/go/wish. Thanks,

matt horn
flex docs

> -----Original Message-----
> From: [email protected] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Roman Protsiuk
> Sent: Thursday, January 18, 2007 7:51 AM
> To: [email protected]
> Subject: Re: [flexcoders] It shouldn't be this hard.
> 
> The first thought is:
> 
> <mx:Canvas width="100%" height="100%">
>     <mx:Image source="{yourSource}" horizontalCenter="0" 
> verticalCenter="0" /> </mx:Canvas> 
> 
> To scale, dunno, but maybe something like:
> 
> <mx:Canvas id="imageContainer" width="100%" height="100%">
>     <mx:Image id="image"
>         source="{yourSource}"
>         width="{imageContainer.width < image.width ? 
> imageContainer.width : image.width}"
>         height="{imageContainer.height < image.height ? 
> imageContainer.height : image.height}"
>         scaleContent="true"
>         horizontalCenter="0"
>         verticalCenter="0" />
> </mx:Canvas>
> 
> This one probably won't work, it's very dirty, however might 
> give you a clue... ;)
> 
> And the easiest way to scale, but still, not so nice from the 
> point of ui (it scales both way) is just: 
> 
> <mx:Image source="{yourSource}" scaleContent="true" 
> width="100%" height="100%" />
> 
> Have fun,
> R.
> 
> 
> 
> On 1/18/07, Russell Sprague <[EMAIL PROTECTED] 
> <mailto:[EMAIL PROTECTED]> > wrote:
> 
>       I hate the flex documentation...
>       
>       All I want to do is dynamically center an image on my stage.
>       
>       I have a VDividedBox with an image in the top, and text 
> in the bottom.
>       I loading in images by setting the source of an image 
> tag(probably not 
>       the best way to do it, but again I hate the Flex docs...).
>       So when the image loads I am trying to set it to center 
> in the upper 
>       pane of the vdividedbox, but all my attemps have failed.
>       
>       It would be nice to also resize the image as the 
> divideBar is dragged, 
>       but only to the original size of the image, then it 
> just centers.
>       
>       Thanks
>       Russ
>       
>       
> 
>       
> 
> 
>  
> 

Reply via email to