How do I open a link in the default browser in Adobe AIR onClick?
- Tuesday, August 17, 2010, 15:11
- Web Design
- 1 comment
Right now I’m building an RSS Adobe AIR application using Flash. It uses an HTML loader to parse the feed into readable parts. I found part of the code from a tutorial but one thing has been bothering me. I would like to open my RSS links in the browser, and not within the application itself. My code as is creates the HTML like this:
for(var a=0; a
RSSItems[a].child(“link”)
RSSContent+=
”
\
“+RSSItems[a].child(“title”)+”\
\
”
}
As you can see, it gets pretty messy with escape characters but it works. However, onClick, I’d like to open in the user’s default browser. Any ideas on how I can accomplish this with the restraints of using HTML?
document.location sends it to the same dynamic text field my feed is pulled up in. I tried going to a self-created function onclick but perhaps I’m not doing it right?
function linkage(href) {
navigateToURL(new URLRequest(href), “_blank”);
}
About the Author
One Comment on “How do I open a link in the default browser in Adobe AIR onClick?”
Write a Comment
Gravatars are small images that can show your personality. You can get your gravatar for free today!
You must be logged in to post a comment.
The setting is default. Or you can specify the browser names.