Skip to main content
Known Participant
June 22, 2007
Question

Transform Object to change MC's registration?

  • June 22, 2007
  • 6 replies
  • 465 views
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?
This topic has been closed for replies.

6 replies

kglad
Community Expert
Community Expert
June 25, 2007
read the op's post that you quoted: that link is not relevant to this thread.

though i can't see any reason for the op to be adverse to using such a work-around.
Inspiring
June 25, 2007
"NewMediaRoc" <webforumsuser@macromedia.com> wrote in
news:f5gst0$qrg$1@forums.macromedia.com:

> 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.
>


http://www.darronschall.com/weblog/archives/000054.cfm

kglad
Community Expert
Community Expert
June 22, 2007
you can do anything you want to the transform matrix. but it will have no impact on any movieclip's registration point.
Known Participant
June 22, 2007
so you can't set (or reset) the transform matrix at all?
kglad
Community Expert
Community Expert
June 22, 2007
that won't work and using the transform matrix won't work unless you use it to essentially duplicate a work-around.