snipplrCallback({"id":50655,"title":"stagewebview-location-changing-without-a-page-refresh","source":"
protected var<\/span> webView:StageWebView = new<\/span> StageWebView(<\/span>)<\/span>;<\/div><\/li> <\/div><\/li> protected function<\/span> processAuth(<\/span>event:ServiceEvent)<\/span>:void<\/span><\/div><\/li> {<\/span><\/div><\/li> <\/div><\/li> \tvar<\/span> url<\/span>:String<\/span> = "http:\/\/theurl.com"<\/span>;\t\t\t\t<\/div><\/li> \twebView.addEventListener<\/span>(<\/span>Event.COMPLETE<\/span>, afterAuthLoad)<\/span>;<\/div><\/li> \twebView.loadURL<\/span>(<\/span>url<\/span>)<\/span>;<\/div><\/li> <\/div><\/li> }<\/span><\/div><\/li> <\/div><\/li> protected function<\/span> onComplete(<\/span>event:Event)<\/span>:void<\/span><\/div><\/li> {<\/span><\/div><\/li> <\/div><\/li> \tif<\/span> (<\/span>webView.title<\/span> == "Remember The Milk - Application successfully authorized"<\/span>)<\/span>{<\/span><\/div><\/li> \t\twebView.dispose<\/span>(<\/span>)<\/span>;<\/div><\/li> \t\tauth.addEventListener<\/span>(<\/span>"result"<\/span>, setToken)<\/span>;<\/div><\/li> \t\tauth.getToken<\/span>(<\/span>frob)<\/span>;<\/div><\/li> <\/div><\/li> \t}<\/span><\/div><\/li> <\/div><\/li> }<\/span><\/div><\/li><\/ol><\/pre>","link":"https:\/\/snipplr.com\/view\/50655\/stagewebview-location-changing-without-a-page-refresh"});