views:

478

answers:

1

I have Flash, in which i load some images dynamically.

But when I am viewing this flash on a large screen monitor, the flash is auto scaling (I can't disable stage auto scaling). And similarly size of images is also increasing. Here the problem arises, On large screen monitors the images are getting blur.

How can I make it good on all size of monitors.

All here i want is to disable scaling on images selectively.

A: 

there is no built-in possibility ... but this code will unscale an arbitrary DisplayObject ...

var m:Matrix = target.transform.concatenatedMatrix;
m.invert();
target.transform.matrix = m;

from here, there are many ways to accomplish, what you want ... the easiest way would be, to disable stage scaling, to listen on resize, and then resize your topmost DisplayObjects, to fit to stage ... the advantage is, that resize event will be triggered ... so for DisplayObjects that you want to stay unscaled, you add a listener to the resize event and unscale them on resize ...

otherwise, put a DisplayObject on stage, and watch it's concatenatedMatrix on enterframe ... if a and d (scaling parameters) change, then you have a resize ... then unscale all objects you want to be unscaled ... this is one extra event handler call and 2 float comparisons on enterframe, so it shouldn't be a performance killer ...

hope that helps ...

back2dos