I am using Flash Builder 4.5 to build an iPhone app.
In order to display ads I plan to use StageWebView and load a webpage containing the ad code.
Lets say the ad will be 320×50 pixels. So the Actionscript code would look similar to this:
adView = new StageWebView();
adView.loadURL("http://www.myadishere.com/ad.html");
var top:Number = navigator.actionBar.measuredHeight + 1
adView.viewPort = new Rectangle(0, top, 320, 50);
adView.stage = stage;
In the application I have set the applicationDPI=”160″ so the application is displayed properly when run on iPhone3 and iPhone4.
However the content of the StageWebView looks tiny on iPhone4.
If I do adView.drawViewPortToBitmapData() the bitmap’s size is OK.
So the question is how to make the StageWebView content to scale accordingly, so it looks OK regardless of the screen DPI?
1 Answer