Jump to content
Search Community

khalidmbajwa

Members
  • Posts

    2
  • Joined

  • Last visited

khalidmbajwa's Achievements

0

Reputation

  1. Nevermind,i have found a way. For anyone who is interested, basically in the resize even for the parent container that houses the FlexTransformManager, i iterate over all the items managed by the FlexTransformManager and use their transform matrix to scale them about the upper left corner (0,0). Here is a snippet. private function resized(e:Event) { if(_manager!=null) { var scaleFactors:Point=new Point(this.width/_lastCoordinates.x,this.height/_lastCoordinates.y); _manager.width=this.width; _manager.height=this.height; var i:Number=0; for(i=0;i<=_manager.numChildren-1;i++) { var item:VisualItem=VisualItem(_manager.getChildAt(i)); var m:Matrix = item.transform.matrix; var oldValues:Point=new Point(m.tx,m.ty); m.translate(0, 0); m.scale( scaleFactors.x, scaleFactors.y); item.transform.matrix = m; m.translate(oldValues.x,oldValues.y); } _lastCoordinates.x=this.width; _lastCoordinates.y=this.height; } } Love how TransformManager class plays well with manually scaled items. Super !
  2. Hey, Firstly i wanted to say what an absolutely terrific library this is, it just works. Amazing ! Now, i have this Flex Container (BorderContainer to be exact) into which i add FlexTransformManager. The thing is that that the applications is re sizable, and scaling seems to adjust the bounds in which objects can be manipulated and not the scale. My requirement is such that the TransformManager container should scale automatically, including its children much like a movieclip does. How do i go about it ? Khalid
×
×
  • Create New...