It crossed my mind that you might be doing something like this. can I recommend an alternate solution? Use a canvas/container to host your plan _and_ all of your placed objects - then just set the scaleX/scaleY of that canvas/container. If you do it this way - you won't have to worry about object placement or spacing.
Rick Winscot From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Gireesh Kumar Sent: Sunday, June 01, 2008 1:06 PM To: [email protected] Subject: Re: [flexcoders] Flex drag n drop, zoom issue Hi, Here is the code I use to set the scaleX and Y values private function doZoom(event:Event):void{ if(currentPlanCanvas == null){ return; } doComponentZoom(currentPlanCanvas, (HSlider(event.currentTarget).value)); } private function doComponentZoom(component:UIComponent,val:Number):void{ component.scaleX = val; component.scaleY = val; if(component is Container){ var children:Array = Container(component).getChildren(); for(var i:int = 0; i < children.length; i++){ doComponentZoom(children[i], val); } } } Thanks Gireesh On Sun, Jun 1, 2008 at 10:22 PM, Rick Winscot <[EMAIL PROTECTED]> wrote: I took a quick look at your sample. and it looks like you are doing something strange with your scaleX/scaleY - they aren't being set uniformly. You'll only need a single change so I would think: scaleX = scaleY = zoomer.value -- no? Rick Winscot From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of gireeshgiri Sent: Sunday, June 01, 2008 3:11 AM To: [email protected] Subject: [flexcoders] Flex drag n drop, zoom issue Hi, I am having an issue with the application currently I am developing, the issue after dropping object to the canvas and if i try to zoom (in-out) the dropped objects seems to shifts its place. I have placed a demo URL, you can drag and drop objects to the plan, and try zooming the plan. Demo URL http://gireeshkumar.ind.in/designDemo/floorDesign2.html Please help me. Thanks Gireesh. -- Gireesh Kumar G http://gireeshkumar.ind.in/

