Beginning to compare pixels today. Example being used is
import flash.display.Bitmap; import flash.display.BitmapData; var bmd1:BitmapData = new BitmapData(50, 50, true, 0xFFFFAA00); var bmd2:BitmapData = new BitmapData(50, 50, true, 0xCCFFAA00); var diffBmpData:BitmapData = BitmapData(bmd1.compare(bmd2)); var diffValue:String = diffBmpData.getPixel32(1, 1).toString(16); trace (diffValue); // 33ffffff var bm1:Bitmap = new Bitmap(bmd1); addChild(bm1); var bm2:Bitmap = new Bitmap(bmd2); addChild(bm2); bm2.x = 60;
http://livedocs.adobe.com/labs/textlayout/flash/display/BitmapData.html#compare()
No comments:
Post a Comment