stageWebView / BitmapData (iPad Retina Issue) [PLEASE HELP]
This has been driving me nuts for months now.. I've been hoping this will magically fix itself with each new release of AIR. Still no luck.
So what's happening is that when I have a button to close out of a stageWebView, I am taking a screenshot of the webView so that I can animate it out. on an iPad1, iPad2, Desktop, etc everything performs as it should... however on the iPad3.. it seems like it is capturing the screen at the non-retina resolution and then blowing up the image X2. So the result is a zoomed in image that animates out.
Here is my code ... am I doing something wrong ?
function closeBrowser():void {
enableAllBrowserControls();
// Hide the preloader
socialPreloader.visible = false;
// Make sure to remove if it exists so we know we're getting a fresh bitmap every time
if (socialViewBitmap != null && contains(socialViewBitmap)) {
removeChild(socialViewBitmap);
socialViewBitmap = null;
}
SocialbitmapData = new BitmapData(socialWebView.viewPort.width, socialWebView.viewPort.height);
socialWebView.drawViewPortToBitmapData(SocialbitmapData);
socialViewBitmap = new Bitmap(SocialbitmapData);
shareFacebookBTN.visible = false;
addChild(socialViewBitmap);
//resize BitMap for iPad3
socialViewBitmap.width = 1024;
socialViewBitmap.height = 664;
socialViewBitmap.x = 0;
socialViewBitmap.y = 42
trace("BitmapData worked" + socialViewBitmap.y);
browserRemoveDelay = new Timer(0, 0); // 1 second
browserRemoveDelay.addEventListener(TimerEvent.TIMER, animateBrowserClose);
browserRemoveDelay.start();
}
