This content has been marked as final. Show 4 replies
So lets get this straight, you now have the content embedded/loaded within a HTMLLOADER, right? And when the AIR APPLICATION is launched, you would want the links that are embedded within the HTMLLOADER to open up in a browser? Are you using:
navigateToURL(new URLRequest(" http://" + url), "_blank");
Perhaps this might help you out.
I should probably add, that I am not a very experienced AIR Developer.
So lets get this straight, you now have the content embedded/loaded within a HTMLLOADER, right?
Probably not... I have a Html based project. Meaning that I refer to an initial html file from my application.xml. In this html File I embed the mentioned flash application using the following line:
< embed height="100%" width="100%" src=" http://myserver.com/myapp.swf?myparam=value" />
Could I use HTMLLoader in a HTML-based AIR app?
And when the AIR APPLICATION is launched, you would want the links that are embedded within the HTMLLOADER to open up in a browser?
This is correct, but it should open up the default Browser like IE or Firefox but not a new AIR window.
Are you using: navigateToURL(new URLRequest(" http://" + url), "_blank");
I am not using navigateToURL since the flash application I am working with "does not know" that it is wrapped by an AIR application. Therefore, it opens new URLs the way it is normally done in a flash stand-alone application.
As I see it AIR recognises that a link is being called and opens a new, AIR window instance.
I have seen the article about Windows Vista before, but I would think that it is not directly related to my problem, since I do not have to problem whether links are being opened in, for example, Firefox or Internet Explorer but links are opened in a build-in AIR Window.
I hope shed some light on the problem I am having...
You ARE using the HTMLLoader. When you create an HTML-based AIR app, the runtime creates a NativeWindow, adds an HTMLLoader to it (setting it up so that it fills the window), and loads your HTML content into the HTMLLoader.
To get links to open in the user's default browser, you must set the HTMLLoader object navigateInSystemBrowser property to true. Do this in the main HTML page with:
window.htmlLoader.navigateInSystemBrowser = true;
This works perfect. Thanks very much.