AS3: Smoothing loaded Pictures

There are a lot of blog posts on the topic of smoothing pictures in Flash after loading. The process goes like this:

private function onPicLoaded(e:Event):void 
		{
			var pic:Bitmap = Bitmap(e.currentTarget.content);
			pic.scaleX = pic.scaleY = 0.2;
			pic.smoothing = true;
		}

But few mention that you also have to set:

stage.quality = StageQuality.BEST;

in order to have the pictures smoothed. Preferably you set this value at the very beginning of your application, in your main class. It’s not neccessary to do it everytime you loaded a picture, its a global setting.

If you are loading your pictures from a different domain there seems to be a problem when there is no policy xml file on that server but you can find solution for that on the web.

Dieser Beitrag wurde unter HowTo, Programming veröffentlicht. Setze ein Lesezeichen auf den Permalink.

Hinterlasse eine Antwort

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind markiert *

*

Du kannst folgende HTML-Tags benutzen: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">