2

Can I somehow check if the stageWebView didn't load the webpage? For example if the user doesn't have internet connection, it won't load google.com... Can I then check if it failed loading Google.com?

user1941346
  • 73
  • 1
  • 1
  • 5

1 Answers1

2

Yes! StageWebView throws an ErrorEvent.ERROR so you can just set up a listener for it:

webView.addEventListener(ErrorEvent.ERROR, onError);  //webView is a StageWebView
function onError(e:ErrorEvent):void 
{
    trace("Page is not available. Try reloading.");
}
Foggzie
  • 9,691
  • 1
  • 31
  • 48