How to get up and running with Apparat

@joa recently posted a simple example to illustrate the power of his powerfull optimization framework called Apparat.

Apparat is a framework to optimize ABC, SWC and SWF files.

From the description of the Google Code page we get a hint of what Apparat actually does: “Apparat is a framework to optimize ABC, SWC and SWF files.”. In layman’s terms: “Apparat will speed up your Actionscript projects by optimizing certain method calls.”. The Actionscript Library for example provides some ( much ) faster ways of doing math and bitwise operations. Read on to understand more about how to get up and running with Apparat.
Continue reading

Smoothing <mx:image/> – the simple way

Solved this little problem the simple way. One of the centralized file sharing applications we’re developing needed some form of branding at the bottom of the screens. The logo bar, 1400 px wide, needs to be resized when the user changes the resolution of the browserwindow.

Without smoothing, things turn ugly and pixelated. With smoothing turned on, everything keeps looking the way it should, even when resized.

<mx:VBox>
    <mx:script>
	private function smoothImage ( img : Image ) : void
	{
		var bmp : Bitmap = img.content as Bitmap;
		bmp.smoothing = true;
	}
    </mx:script>
    <mx:image id="logoImage" complete="smoothImage(logoImage)" source="images/logo.png" width="100%" scaleContent="true"/>
</mx:VBox>