For perhaps obvious reasons, I've been trying to make a web browser using AIR's HTML component. I made some really quick assumptions about how this component was going to work and how much functionality Adobe would be putting into it. My assumptions are partly based on an entry in the AIR Developer FAQ. It reads:
Q: Is Adobe AIR a web browser?
A: No. Adobe AIR is a cross-operating system runtime that runs outside of the browser. Theoretically you could build a web browser on top of Adobe AIR.
Naturally I thought: "Wow, what a sweet possibility!" I could make a cool little custom browser with some rad built in features. But it wasn't until after hours and hours of trying to create a general purpose browser, I've come to a breaking point. I should have realized this earlier, but its just not made for general web browsing yet. I mean, a quick Google search reveals that no one else out there seems to be trying to make a browser on top of AIR. Not to mention you can't open links that use an "_blank" target or open Javascript created windows.
It's my own fault really for making the assumption this was possible. So now I can only hope that we get something more robust in the future.

3 Responses to “Bummed out over AIR’s HTML component”
So, not sure about _blank windows, that was a bug in previous builds. Don’t know if they fixed this yet.
However, for opening links, there’s a callback into actionscript, which can then take the appropriate action. It’s made that way to give you more flexibility.
Don’t fret, you just need to tweak the incoming HTML object to do what you want:
In a listener for the complete event of an HTML load grab the links:
var allHrefs:Object = e.currentTarget.domWindow.document.getElementsByTagName(“a”);
Now do a for a loop to read through the allHrefs Object (treat it like an array) and call a separate function for allHrefs:
allHrefs[i].onclick = clickLink();
In that clickLink function you can check the current target, if it’s blank, then:
navigateToURL(new URLRequest(someObjectReference.currentTarget.href),”blank”);
That’s it.
Hi, for some reasons I can’t see embedded flash movies, embedded windows media player using mx:HTML component in an AIR application. Does anyone here experience the same?