Thanks for your replay. Had a look on it, maybe will take another one, but as I was trying to do the same with a Loader component, issues were the same. Event.INIT event is fired by the Loader and it's width and height remain 0, and I have to use loader.content too. That's just something I don't get. Why do width and height remain 0 after an INIT event?
--- In [email protected], "Adam Royle" <[EMAIL PROTECTED]> wrote: > > Not sure if this will help, but have you looked at Ely Greenfield's SuperImage Component? > > http://www.quietlyscheming.com/blog/2007/01/23/some-thoughts-on-doubt-on-flex-as-the-best-option-orhow-i-made-my-flex-images-stop-dancing/ > > Adam > > ----- Original Message ----- > From: vitcheff > To: [email protected] > Sent: Tuesday, May 08, 2007 8:39 PM > Subject: [flexcoders] Image Component Nightmare > > > Hi all, > What I'm trying is to achieve is to have a thumbnails bar with some > images in it, which, when clicked, should display the corresponding > large version in a Canvas. > > I'm doing this through AS3 in UIComponent-based class. There is an > Image component instance which is placed in a Canvas instance. What > I'm trying to do is scale the image down to the canvas's size and then > provide a slider to zoom it in/out. > > What makes me crazy is that I have to scale image.content instead of > the image itself and after that make a ton of magic when trying to > figure what the width and height of the image is, to be able to center it. > > Although the content is scaled down, image.width remains unchanged, > and working with the content's size still brings some unexpected > behaviour in. > > Is there something bad about my approach. Handling a simple image > shouldn't be that freaking hard. Do I miss something? > > Thanks in advance! >

