开发者

Flip an instance

开发者 https://www.devze.com 2023-02-21 23:53 出处:网络
I\'ve searched everywhere and never found what I was looking for, simple as it is. I just want to flip an instance verti开发者_运维技巧cally and horizontally in ActionScript. I\'ve tried multiplying t

I've searched everywhere and never found what I was looking for, simple as it is. I just want to flip an instance verti开发者_运维技巧cally and horizontally in ActionScript. I've tried multiplying the width by -1, but it didn't do anything at all. I've looked into transformations but to no avail either.


Set the object's scaleX/scaleY property to -1


sydd is almost right, I think they just typed it wrong in haste. You want to multiply the objects scaleX/scaleY by -1. This inverts the number. For example:

myMovie.scaleX *= -1;

Will flip horizontally. Likewise:

myMovie.scaleY *= -1;

Will flip veritcally.

0

精彩评论

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

关注公众号