开发者

Flash scaling quality

I have a flash application in which I need to scale a MovieClip. This MovieClip contains an image (in a Loader) with a resolution of 1024x768 (which is the size of the MovieClip as well).

When I want to scale this MovieClip to 80% I do:

myMovieClip.scaleX = 0.8;
myMovieClip.scaleY = 0.8;

The problem is the resulting scaled image has aliasing and is not of good quality. Is there a way to change the scaling algorithm used to get a better image开发者_如何学Python? Or is there a better way to scale MovieClips?

I can't rely on bitmap data because this MovieClip may contain another SWF with video for example and it must scale regardless of its internal content.

Thanks.


You need to set the smoothing property on your Bitmap before you scale it (or its container). Also see this link: Bitmap.smoothing - how to reduce image distortion.


I can't comment on the accepted answer but probably the missing second link is this one: Bitmap.smoothing - how to reduce image distortion

From the link: To reduce distortion when resizing a Bitmap, if it's an image loaded externally:

var image:Bitmap=loader.content as Bitmap;
image.smoothing=true;

If it's an Bitmap from the library, just check its property "Allow smoothing"

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜