从报名点更改影片剪辑的高度 [英] Change the height of a movieclip from a registration point
本文介绍了从报名点更改影片剪辑的高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有一种方法来扩展动态影片剪辑的唯一的底部?我试图改变高度或缩放我的三菱商事,但它总是让变化相关的影片剪辑的中心。我想我应该定义一个报名点,并更改根据它的高度,但我不知道怎么办了。希望有人能指导我。谢谢。
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:矩阵);
这篇关于从报名点更改影片剪辑的高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文