AIR 3.2 StageWebView complete event not working on iPad2
I have created a simple test app using Flash CS5.5 and air 3.2 to test the stageWebView functionality however I am having problems getting the Event.COMPLETE to fire. My website loads fine but the onComplete function is not being called.
Here is my code. I would appreciate if anyone can confirm if there is a bug or if there is a problem with my code.
import flash.media.StageWebView;
if (objApp == undefined) {
var objApp = new Object();
}
function displayWebsite(e:MouseEvent):void {
objApp.webView = new StageWebView();
objApp.webView.stage = this.stage;
objApp.webView.viewPort = new Rectangle(120, 120, 530, 710);
objApp.webView.addEventListener(Event.COMPLETE,onComplete);
objApp.webView.loadURL("http://www.mediakitchen.co.uk");
}
function onComplete(e:Event):void {
debugTxt.text = "WebPageLoaded";
}
function onError(e:ErrorEvent):void {
debugTxt.text =="Page is not available. Try reloading.";
}
function onChanging(e:LocationChangeEvent):void {
debugTxt.text =="Loading...";
}