
Код AS3:
var shape: Shape = new Shape();
var g: Graphics = shape.graphics;
g.beginFill(0xFF0000);
g.drawRect(0, 0, 10, 10);
g.endFill();
var bitmapData: BitmapData = new BitmapData(shape.width, shape.height);
bitmapData.draw(shape);
trace( bitmapData.getPixel(5, 5).toString(16) ); // ff0000