StageWebView Location Changing without a Page Refresh


/ Published in: ActionScript 3
Save to your folder(s)



Copy this code and paste it in your HTML
  1. protected var webView:StageWebView = new StageWebView();
  2.  
  3. protected function processAuth(event:ServiceEvent):void
  4. {
  5.  
  6. var url:String = "http://theurl.com";
  7. webView.addEventListener(Event.COMPLETE, afterAuthLoad);
  8. webView.loadURL(url);
  9.  
  10. }
  11.  
  12. protected function onComplete(event:Event):void
  13. {
  14.  
  15. if (webView.title == "Remember The Milk - Application successfully authorized"){
  16. webView.dispose();
  17. auth.addEventListener("result", setToken);
  18. auth.getToken(frob);
  19.  
  20. }
  21.  
  22. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.