Thanks you
Very helpful got it rendering now, also I accidentally deleted super.render(); from my override render ,
I one last question, is it possible to get the water_sprite back from the bitmapdata and then edit it e.g. make it longer change colour ect? then put it back in without removing the old bitmapdata then creating a new one creating, I’m using is the render my water physics.
I can’t find anything in…
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/BitmapData.html
But most likely I’m miss understanding something.
ideally like this e.g…
// frame 1
water_sprite = new Sprite();
water_sprite.graphics.beginFill(0x13CAD9, 1);
water_sprite.graphics.moveTo(0, 0);
water_sprite.graphics.lineTo(10, 0 );
water_sprite.graphics.lineTo(10, 10);
water_sprite.graphics.lineTo(0, 10);
water_sprite.graphics.endFill();
bit_map_data = new BitmapData(50, 50,true,0);
bit_map_data.draw(water_sprite);
addGraphic(new Image(bit_map_data));
//frame 2
water_sprite.clear();
water_sprite.graphics.beginFill(0x000000, 1);
water_sprite.graphics.moveTo(0, 0);
water_sprite.graphics.lineTo(20, 0 );
water_sprite.graphics.lineTo(20, 20);
water_sprite.graphics.lineTo(0, 20);
water_sprite.graphics.endFill();
bit_map_data.draw(water_sprite);
If I added the bitmap to a child this works but I cannot control the layer of which it renders.