I can’t seem to get .copypixels working. For example in an Entity:
override public function render():void {
//super.render()
var containerData:BitmapData = new BitmapData(550, 400, false, 0xFFFFFFFF);
containerData.copyPixels(FP.buffer, FP.buffer.rect, new Point(x, y));
graphic.render(containerData, new Point(x, y), new Point(FP.camera.x, FP.camera.y));
}
or
var containerData:BitmapData = FP.buffer.clone();
graphic.render(containerData, new Point(x, y), new Point(FP.camera.x, FP.camera.y));
Nothing is being rendered.
Essentially, I’m trying to create a “trail” effect for the player motion by copying the sprite and drawing the copies. Not sure if there’s a better way? I’m using Spritemap for the player sprite.