Welcome!

Welcome to the Official BlackBerry Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Adobe AIR Development

Reply
Regular Contributor
wmatt
Posts: 88
Registered: ‎10-02-2011
My Carrier: none

Screenshot from Dev Alpha Simulator

Is there a way to get a high resolution screenshot from the Dev Alpha simulator?

 

"Screenshots must be sized at either 1280x768 (landscape) or 768x1280 (Portrait) pixels"

Please use plain text.
Developer
shaan_softwaredvlpr
Posts: 172
Registered: ‎01-17-2011
My Carrier: Airtel

Re: Screenshot from Dev Alpha Simulator

By pressing volume down & up buttons at once , you will have device screenshot image in camera folder
Please use plain text.
Regular Contributor
wmatt
Posts: 88
Registered: ‎10-02-2011
My Carrier: none

Re: Screenshot from Dev Alpha Simulator

How do you press them both at once in the simulator?

Please use plain text.
Developer
shaan_softwaredvlpr
Posts: 172
Registered: ‎01-17-2011
My Carrier: Airtel

Re: Screenshot from Dev Alpha Simulator

Oops Sorry , i dint notice you asked for simulator..
Appologies..
Please use plain text.
Developer
jtegen
Posts: 6,145
Registered: ‎10-27-2010
My Carrier: AT&T

Re: Screenshot from Dev Alpha Simulator

You can do a screen shot of the window and crop off the rest you dont want.
Please use plain text.
Developer
Innovatology
Posts: 1,064
Registered: ‎03-03-2011
My Carrier: Vodafone

Re: Screenshot from Dev Alpha Simulator

Press PrintScreen on your keyboard, then paste the image into Photoshop to crop it.

Files & Folders, the unified file & cloud manager for PlayBook and BB10 with SkyDrive, SugarSync, Box, Dropbox, Google Drive, Google Docs. Free 3-day trial! - Jon Webb - Innovatology - Utrecht, Netherlands
Please use plain text.
New Contributor
ktylman
Posts: 8
Registered: ‎12-18-2012
My Carrier: None

Re: Screenshot from Dev Alpha Simulator

[ Edited ]

wmatt wrote:

Is there a way to get a high resolution screenshot from the Dev Alpha simulator?

 

"Screenshots must be sized at either 1280x768 (landscape) or 768x1280 (Portrait) pixels"


The annoying thing about trying to get the screen shots from the simulator is that it is scaled by default so using PrintScreen won't work. I haven't tried it but there is a telnet command to resize the simulator as described here https://developer.blackberry.com/develop/simulator/simulator_configuring.html

 

What I eventually settled on was just running my AIR app in the debugger and writing a PNG file out. I actually use this method for all my apps. Since I release across multiple platforms, this is a lot easier than trying to capture screen shots for a dozen different resolutions.

 

Here is a simplified version of the code I use. I put this in my main key handler method.

 

// l_screenWidth, l_screenHeight - Dimensions of the application window
// this - main sprite container. Dimensions should match app screen width and
// be located at 0, 0
// l_fileName - The name of the file. This will be located in your storage
// directory. On Windows 7 this is usually <User>/AppData/Roaming/<package>.debug

if (67 == event.keyCode) // 'c' { var l_bitmapData&colon;BitmapData = new BitmapData(l_screenWidth, l_screenHeight, false, 0xFFFFFFFF); l_bitmapData.draw(this);

   var l_stream:FileStream = new FileStream();
   var l_file:File = File.applicationStorageDirectory;
   l_file = file.resolvePath(l_filePName);

var l_ba:ByteArray = PNGEnc.encode(l_bitmapData);
   l_stream.open(l_file, FileMode.WRITE);
   l_stream.writeBytes(l_ba, 0, l_ba.length);
   l_stream.close(); }

 In the above example "this" can be any sprite. My apps are structured so the top level sprite is the root container and it is the same size as the screen. I did not put the complete code here. Just what was necessary. If you're going to use this you'll most likely want to add some error handling. You'll also need to get the PNGEnc class from here http://www.kaourantin.net/2005/10/png-encoder-in-as3.html

 

Hope this helps somewhat.

Ken Tylman

Grim Guy Gameworks

http://grimguygameworks.com

 

 

 

 

 

Ken Tylman
Grim Guy Gameworks
Please use plain text.