Chris Herring

 Flash Developer

 London

Posts Tagged ‘pixels’

The bit between pixels

19/10/09

A little Actionscript 3.0 function to help to find those DisplayObjects in Flash which are placed on half pixels and then snap them back into place. Although you can just leave them floating on half pixels if you want!

private function displayListSnapper(container:DisplayObjectContainer, round:Boolean, debug:Boolean, indent:String = “”):void
{
var child:DisplayObject;
for (var i:uint=0; i < [...]