Revision: 36711
Updated Code
at November 27, 2010 16:05 by ninjaparade
Updated Code
public static function getBitmapData(target:DisplayObjectContainer) : BitmapData { var bounds : Rectangle = new Rectangle(); bounds = target.getBounds(target); var matrix : Matrix = new Matrix(1, 0, 0, 1, 0 - bounds.x, 0 - bounds.y); matrix.scale(1, 1); //for png data set the transparent to true, otherwise just leave as false var bmd : BitmapData = new BitmapData(bounds.width, bounds.height, true); bmd.draw(target, matrix, null, null, null, true); return bmd; }
Revision: 36710
Updated Code
at November 25, 2010 08:08 by ninjaparade
Updated Code
public static function getserverloadFishBmpData(target:DisplayObjectContainer) : BitmapData { var bounds : Rectangle = new Rectangle(); bounds = target.getBounds(target); var matrix : Matrix = new Matrix(1, 0, 0, 1, 0 - bounds.x, 0 - bounds.y); matrix.scale(1, 1); //for png data set the transparent to true, otherwise just leave as false var bmd : BitmapData = new BitmapData(bounds.width, bounds.height, true); bmd.draw(target, matrix, null, null, null, true); return bmd; }
Revision: 36709
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at November 25, 2010 06:10 by ninjaparade
Initial Code
public function getserverloadFishBmpData(target:DisplayObjectContainer) : BitmapData { var bounds : Rectangle = new Rectangle(); bounds = target.getBounds(target); var matrix : Matrix = new Matrix(1, 0, 0, 1, 0 - bounds.x, 0 - bounds.y); matrix.scale(1, 1); //for png data set the transparent to true, otherwise just leave as false var bmd : BitmapData = new BitmapData(bounds.width, bounds.height, true); server.draw(target, matrix, null, null, null, true); return bmd; }
Initial URL
Initial Description
Initial Title
Get bitmap data dynamically
Initial Tags
data, flash
Initial Language
ActionScript 3