How can i grab a screenshot of the whole view or an object placed in the view?
grab a screenshot of the viewSoftware: Away3D 4.x |
||
|
||
jscamposcr, Newbie
Posted: 15 October 2012 11:57 PM Total Posts: 20 [ # 1 ] You can get the bitmap data of the stage:
var bitmapdata:BitmapData = new BitmapData(stage.stageWidth, stage.stageHeight); In order to make this a downloadable JPG follow this tutorial: |
||
|
||
Tayyab, Member
Posted: 16 October 2012 03:15 AM Total Posts: 72 [ # 3 ] i did this to do a quick test. but its all blank (white).
var bitmapdata:BitmapData = new BitmapData(GVC.stage.stageWidth, GVC.stage.stageHeight); |
||
thatflashdude, Newbie
Posted: 19 October 2012 06:05 AM Total Posts: 19 [ # 4 ]
i believe the reason is you can not take a bitmap screenshot of the stage because the stage3d stuff isnt on the display list at all. instead you need to grab a screenshot using these apis context3D.drawToBitmapData() do a search on the away3d code for these methods and you will find an api that wraps around it..something called queuesnapshot
|
||
Ivan Moreno, Newbie
Posted: 19 October 2012 06:36 PM Total Posts: 22 [ # 5 ] Hi Tayyab, thatFlashDude is right, it is not working because you are drawing the wrong layer and you have to do something little extra with your renderer to avoid buffers problems/stress (Because you must have to clean your buffers every single draw/frame, and if you keep cleaning them, there is not bitmap data to catch). Use the exact same approach of jscamposcr, something like this:
var bitmapData:BitmapData = new BitmapData(yourview.width, yourview.height); Hope this is what you are looking for. Best. [Edit 23/10/2012] This is the original post that I wanted to share with you, but I couldn’t find it that day. I think you already asked in there. Thanks John. Away3D thread here.[/Edit] |