How to prevent Flash from blurring an image after zooming with the `z` property?
I'm currently testing various ways to zoom images (or rather, whole DisplayList hierarchies). Using scaleX
and scaleY
works quite well, but when I use the z
property to zoom the image (by placing it further away) the image gets blurred when returning to z=0
.
The image is put in a Sprite
("groundLayer") and that Sprite
itself is put in another Sprite
("zoomLayer"). Whenever I'm zooming I'm manipulating properties of the "zoomLayer" only.
This image was taken right after returning scaleX
and scaleY
back to 1.0
:
This image was taken right after returning z
back to 0.0
:
I've tried searching for information about this phenomena but couldn't really find anything useful. Can anyone开发者_如何学C explain what's happening there? Why is Flash blurring the image after manipulating the z
property? Is there a way to prevent that (well, other than obviously leaving z
alone)?
whenever you introduce the 3D you are operating under a different rendering engine, it makes things blurry as hell and really should be avoided if possible. To counteract the problem when returning to its original size you need to set mc.transform.matrix3D = null;
then it will return to 2D space and be rendered normally again.
if you are wanting to do it while at a different point then have a look through exampes hereto try and pick out something more useful to you:
I see no reason in this example why you would prefer to be using the 3d engine rather than the 2d scale.
精彩评论