Recently, someone asked about trying to improve hiding the white rectangle of the StageWebView. I got to thinking about this and tried a little experiment. Did I have to set the viewPort during the normal configuration, or could I wait?
So, I decided to try it. I moved the setting of the StageWebView’s viewPort until the page had been loaded. We know this via an Event.COMPLETE event. Here is the sample code:
var webView:StageWebView = new StageWebView();
webView.stage = this.stage;
//webView.viewPort = new Rectangle(0, 0, 480, 200);
webView.viewPort = new Rectangle(0, 0, 480, 300);