How to display a bitmap img above away3d contents?

Software: Away3D 4.x

glasses, Newbie
Posted: 25 March 2013 05:53 AM   Total Posts: 28

Hi, all! Since I am new to flash programming, I want to ask a basic question here.

Now I have used drawToBitmapData to capture the screenshot for away3d content and then save it in a var img. But how can add this img into flash display list and set the value for z sort?

Thanks in advanced!

   

Sociofilm, Newbie
Posted: 31 August 2013 01:26 PM   Total Posts: 3   [ # 1 ]
var spr:Sprite = new Sprite();
 
addChild(spr);

private function 
onMouseClick(e:MouseEvent):void
{
 
var image:BitmapData = new BitmapData(stage.stageWidthstage.stageHeighttrue0x000000);
 
_view.renderer.queueSnapshot(image);
 
_view.render();

//  As bonus --> save bitmap image as JPG file
//   var jpg:JPEGEncoder = new JPEGEncoder(100);
//   var byteArray:ByteArray = jpg.encode(image);
//   var fileReference:FileReference=new FileReference();
//   fileReference.save(byteArray, "image.jpg");

 
spr.addChild(new Bitmap(image));
   

Sociofilm, Newbie
Posted: 31 August 2013 01:26 PM   Total Posts: 3   [ # 2 ]

please

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X