5 Replies Latest reply on Jun 16, 2011 9:47 AM by grotter

    iOS Native Alert with StageWebView

    grotter

      I figured out a hacky workaround for this using StageWebView. Pretty simple stuff, just use an invisible viewport and insert a javascript alert ala...

       

      if (StageWebView.isSupported) {

      _webView = new StageWebView();

      _webView.stage = this.stage;

      _webView.viewPort = new Rectangle(0, 0, 0, 0);

      _webView.loadString("<script>alert('hello world!');</script>");

      } else {

      trace("StageWebView not supported!");

      }

       

      The problem is, the title of the alert box is populated with what looks like a machine-generated app id (see below). Anyone know how to change or remove the alert box title? At the least, I'd like to change it to something more user-friendly instead of random gibberish. I can't use loadURL, because my alert is intended to notify users of a lost network connection.

       

      thanks in advance,

      Greg

       

       

      IMG_0469.png