开发者

Setting movieclip origin with AS3

I have a spotlight that moves on a stage. Now I rotate the spotlight but i开发者_StackOverflow社区ts not rotating on the correct point/origin.

I am trying to do something like

myOject.setOrigin = {x , y};
//and then rotate it about x,y.

I have manually set the white circle in the correct place and when I rotate the object with the mouse on the screen it works. Can somebody help me?


Make sure the registration point is in the middle of your symbol. It's not the white circle that appears when you use the Free Transform Tool:

Setting movieclip origin with AS3

But the crosshair that appears when you edit your movie clip:

Setting movieclip origin with AS3

You can easily center the object by selecting everything, then opening the Align panel and aligning its horizontal and vertical axes to the center using the two "center" icons under the Align section. If your MC has multiple items per layer, group each layer before aligning, then ungroup after aligning:

Setting movieclip origin with AS3


The white circle is not what will be used as the origin, it's the little cross. Adjust your clip to have that in the center (you'll have to move all of it's contents). Another option, if moving is not possible, is to wrap your clip in another clip and move it within that.


Select symbol and click CTRL+E - Then move it to positioning cross.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜