6 Replies Latest reply on Jun 26, 2007 9:50 AM by Damon Edwards

    Transform Object to change MC's registration?

    NewMediaRoc
      I've been reading how people are finding work around ways of changing the registration point of a MovieClip dynamically. But these work arounds involve having to use something like _x2 to change the x position. I'm working with the MC Tween extension so I don't want to try dealing with secondary properties (IE: _x2).

      The application of what I want to do is as follows: I want to be able to click on a spot in a movie clip and set that location as the registration point. Then I can slide the movie clip so that the new registration point is in the middle, and scale based on the location of that registration.

      I've been reading up on the transform.matrix and am pretty sure that my setting the a,b,c,d properties of the matrix, I should be able to theoretically set the registration point dynamically.

      This is how I'm setting these properties (script is a snippet from a function of the movie clip, so this refers to that movie clip):
      var myMatrix:Object = this.transform.matrix;
      myMatrix.b = this._xmouse;
      myMatrix.c = this._ymouse;
      myMatrix.a = this._xmouse;
      myMatrix.d = this._ymouse;
      this.transform.matrix = myMatrix;

      I later scale and translate the movie clip using the MCTween methods.

      Any ideas on how to make this actually work? Or any other insights?