I've managed to sort it out in a slightly different manner - by not
specifying the width / height of the container, it sizes itself to the
minimum size it can be without scroll bars. Once the resize has occurred
I then set the scaleX/scaleY properties based on actual width / required
width ratio. Seems to work ok!

 

Thanks,

 

Mark

 

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alex Harui
Sent: 13 November 2007 17:42
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] How to scale containers?

 

You;ll have to add another container layer

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mark Ingram
Sent: Tuesday, November 13, 2007 6:19 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] How to scale containers?

 

I suppose I should say the problem I have, that might help:

 

If I have a component that is 100x100, I want to display it's contents
scaled down by 50%. So I set the scaleX & scaleY properties to 0.50. The
trouble is, when I view my container, it is now 50x50. I can see why
it's done that, but really I was hoping to just scale the contents - not
the container itself (the scrollbars are also 50% scaled).

 

Mark

 

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mark Ingram
Sent: 13 November 2007 12:47
To: flexcoders@yahoogroups.com
Subject: [flexcoders] How to scale containers?

 

Hi, I have a custom container which is based on the Canvas control. It
just displays other custom controls that are also based on Canvas. If I
wanted to do a thumbnail preview of the main container, how do I go
about scaling everything? For instance, if the main container displays
at 800x600, how can I scale it down into a control 80x60?

(I'm assuming there is something built in to flex to do most of this
without manually writing scaling code?)

 

Thanks,

 

Mark

 

 

 

 

Reply via email to