This content has been marked as final. Show 7 replies
Hi, if you create a shape vector from director, the reg point is in the center of it; if you import a vector created in other aplication (flash), the regpoint is in the top left corner. To change the regpoint of an imported shape, try this:
put your shape in the stage in x,y = 0,0 position, then, if your shape rect is 12,8 pixs, and if you want to move the regpoint to the center of it
on preparemovie me
member("yourshape").regpoint = point(6,4)
play and stop the movie, your shape will change the regpoint to 6,4
remove the script, and that's all.
Thank you for the reply.
I wasn't mentioning the vector shapes, but rather the primitive shapes available directly from the toolbar. And for those I can't seem to be able to define the registration point.
> And for those I can't seem to be able to
> define the registration point.
Exactly - you can't. They are top-left and immovable.
I assume that you want to position the oval sprite with respect to its centre. Try dropping the following behavior on the oval sprite, then call the CenterOnLoc handler. For test purposes, I have included a mouseUp() handler so that a simple click on the sprite will place its centre under the mouse. You will probably want to remove this mouseUp() handler later.
Please forgive the intrusion and the question rather than an answer, but I'm curious...can't you use the registration point tool in the paint window? Double click the cast member so it appears in the paint window, then double click the reg. point tool (the one with the cross hairs in a circle) and it should center the point...right?
*curiosity killed the cat, but satisfaction brought it back*
That would work, but only on bitmaps. This question is specifically
asking about shapes which do not use the paint window.
My mistake, thank you, Mike.