从报名点更改影片剪辑的高度报名点、影片剪辑、高度

2023-09-08 11:45:24 作者:寄风吻你

有没有一种方法来扩展动态影片剪辑的唯一的底部?我试图改变高度或缩放我的三菱商事,但它总是让变化相关的影片剪辑的中心。我想我应该定义一个报名点,并更改根据它的高度,但我不知道怎么办了。希望有人能指导我。谢谢。

Is there a way to extend only the bottom part of a dynamic Movieclip? I tried to change the height or to scale my mc but it always makes the change relativity to the center of the Movieclip. I guess I should define a registration point and change the height according to it but i'm not sure of how to do it. Hope someone can guide me. Thanks.

推荐答案

的http://www.flashwonderland.com/transformation-matrix/transformation-matrix-2.html

您可以用矩阵变换来达到这种效果。

You can use matrix transforms to achieve that effect.

对于一个规模从上使用是这样的:

for a scale from the top use something like this:

var scaleFromTopY:Number = 2;// change this to the correct number.
var scaleFromTopX:Number = 1;// change this as well

var topScaleMatrix:Matrix = new Matrix(
        scaleFromTopX, 0,
        0, scaleFromTopY,
        0, (mc.height*scaleFromTopY)/2 // Make this last part into -(mc.height*scaleFromTopY)/2 to scale from the bottom
);
mc.transform.matrix = topScaleMatrix;

您还可以结合矩阵Matrix.concat(M:矩阵);