var s:Sprite = new Sprite();
s.graphics.clear();
s.graphics.beginFill(0xf75544, .5);
s.graphics.moveTo(50, 0);
s.graphics.lineTo(100, 50);
s.graphics.lineTo(50, 100);
s.graphics.lineTo(0, 50);
s.graphics.lineTo(50, 0);
s.graphics.endFill();

var b:BitmapData = new BitmapData(100, 100, true, 0x0);
b.draw(s);
var bitmap:Bitmap = new Bitmap(b);

s.x = 50;
addChild(s);
addChild(bitmap);