Skip to content

Instantly share code, notes, and snippets.

@destroytoday
Created September 17, 2010 04:42
Show Gist options
  • Save destroytoday/583722 to your computer and use it in GitHub Desktop.
Save destroytoday/583722 to your computer and use it in GitHub Desktop.
public function openLinkInBackground(url:String):void
{
NativeApplication.nativeApplication.addEventListener(Event.DEACTIVATE, applicationDeactivateHandler);
navigateToURL(new URLRequest(url));
}
protected function applicationDeactivateHandler(event:Event):void
{
NativeApplication.nativeApplication.removeEventListener(Event.DEACTIVATE, applicationDeactivateHandler);
NativeApplication.nativeApplication.activate();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment