I am trying to port Darron Schall's implementation of the
DynamicRegistration for Flex 2 (haven't seen a way to set registration
points in Flex 2).

I have rotations working fine on dynamic registration points, but it's not
working with scaling (scaleX, so far).

So, does Flex 2 still take scaling into account when computing localToGlobal
and globalToLocal (as Flash 8 appears to have)? Such as:

           var b:Point = new Point( xreg, yreg  );
            b = target.localToGlobal(a);
           b = target.parent.globalToLocal(a);

full method:

       public function set scaleX(value:Number):void
       {
           trace( "\n ** set scaleX( " + value );

           var a:Point = new Point( xreg, yreg );
            a = target.localToGlobal(a);
           a = target.parent.globalToLocal(a);
           trace( "a: "+a );

           target.scaleX = value;

           var b:Point = new Point( xreg, yreg  );
            b = target.localToGlobal(a);
           b = target.parent.globalToLocal(a);
           trace( "b: "+b );

           trace( "pos before : "+target.x + ", " + target.y );
           target.x -= b.x - a.x;
           target.y -= b.y - a.y;
           trace( "pos after : "+target.x + ", " + target.y );
       }

: : ) Scott

Reply via email to