Skip to content

Instantly share code, notes, and snippets.

@tpryan
Created January 12, 2011 22:50
Show Gist options
  • Save tpryan/777064 to your computer and use it in GitHub Desktop.
Save tpryan/777064 to your computer and use it in GitHub Desktop.
ActionScript StageWebView snippet
protected var webView:StageWebView = new StageWebView();
protected function processAuth(event:ServiceEvent):void
{
var url:String = "http://theurl.com";
webView.addEventListener(Event.COMPLETE, afterAuthLoad);
webView.loadURL(url);
}
protected function onComplete(event:Event):void
{
if (webView.title == "Remember The Milk - Application successfully authorized"){
webView.dispose();
auth.addEventListener("result", setToken);
auth.getToken(frob);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment