开发者

Smooth scaling a MovieClip

开发者 https://www.devze.com 2023-04-13 02:44 出处:网络
I have a MovieClip that contains bitmaps as frames. How can I scale it smoothly, achieving the same effect as with Bitmap.smoothing set to true?

I have a MovieClip that contains bitmaps as frames. How can I scale it smoothly, achieving the same effect as with Bitmap.smoothing set to true?

I also have a Sprite that contains Bitmaps. I want to achieve the same effect on the Sprite, but setting its scaleX and sc开发者_如何学GoaleY properties results in the same problem. I tried setting smoothing to true on the children Bitmap instances, but nothing seems to happen.


A trick that you can use to get a smoothing-like effect on a MovieClip is to apply a small BlurFilter to it, like:

var blurFilter:BlurFilter = new BlurFilter(2, 2, BitmapFilterQuality.LOW);
my_mc.filters = [ blurFilter ];

Either this, or assign smoothing=true for each bitmap inside the MovieClip.

0

精彩评论

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

关注公众号