This content has been marked as final. Show 2 replies
this topic has been cover multiple times. have you tried the forum search?
when creating an mc with script, the registration point is always at top/left (zero,zero).
a quick get-around to resolve this is to create an inner mc that is the actual circle you want. then reposition it so that the center of the circle is possition at (0,0) of its parent.
by this point, you can rotate the parent and it will look like the origin (registration point) is in the center and not top/left.
the existing threads probably cover a lot more details, and the correct search words, "registration point"
You could create an inner movie clip and draw to it. Once you've finished
drawing, center it in its parent.
var mc_outer = this.createEmptyMovieClip("mc_outer",
var mc_inner = mc_outer.createEmptyMovieClip("mc_inner",
// draw a square in the inner mc
mc_inner._x = 0 - (mc_inner._width/2);
mc_inner._y = 0 - (mc_inner._height/2);
"programmerG" <firstname.lastname@example.org> wrote in message
> My dilemma: I) I create an empty movie clip in flash via actionscript.
> use the "lineto" command multiple times to create a polygon (as part of
> movie clip) and then I fill it. 3) Everything works great, the drawn
> clip is on the screen. 4) I write code to rotate the movie clip and the
> point isn't the middle of the movie clip, it's the origin on the screen.
> movie clip literally rotates and moves off the screen in a large circle.
> How do I set the movie clip's center point in actionscript so that it
> in the center of the movie clip itself, thus allowing it to rotate in