I'm pretty sure that mx:HTML is the current way to make a browser.
Adobe encourages you to use MX components and containers along with Spark components. Because Adobe continues to build components atop the same base class (UIComponent), there should be full interoperability between Spark and MX.
The weird thing is that mx.components.html isn't listed with or without a spark equivilent. It's definitely still there though, I built a little "mini browser" while looking into this myself and it seems to work fine. This is what the apache HTTP_USER_AGENT variable reports (I'm on osx with Flex 4 and air 2)
But it just won't work (compile or code complete) in Flash Builder so I am forced to think that there isn't any support directly for the HTML tag anymore.
With the following namespaces:
Neither <mx:HTML/> nor <ns:HTML/> worked. So it must be called something else now right? I wonder what is it called now or rather what's the alternative now?
mx:HTML is only available in AIR projects.
Jason San Jose
Software Engineer, Flash Builder
the namespace for the component is library://ns.adobe.com/flex/mx which is different from the normal mx ns url.
Keep in mind what Jason said though, the mx.html component is only for AIR.
It is mx.controls.html
Thanks for the clarification.
So let me rephrase my question I suppose: What should Flex 4 users (not AIR users) do to render html? And please (I'm praying) don't say TextFlow because it can hardly support more than 7 or 8 html tags when converting them over to TLF.
The htmlText property of <mx:TextArea>, which simply relies on the htmlText property of the Player's TextField, supports a limited subset of HTML.
If you are using <s:TextArea> (which is based on the new Text Layout Framework rather than on TextField), you can use TLF's TextConverter class to convert a similarly small subset of HTML to a TextFlow to be rendered by the Spark TextArea.
If you need full HTML support outside of AIR, you have to create a browser iframe and float it on top of your Flex app so that it looks like it is part of the app.
The web players do not include an HTML renderering engine like AIR does because it would make the size of these players too large. For example, I believe WebKit in AIR is more than 10MB of code.
Adobe Flex SDK Team
1 person found this helpful
You could google around for the iFame trick which puts places an iFrame above a Flash movie and makes them look integrated. There is even a commercial component from Drumbeat Insight that helps make this stuff work.
My own personal opinion is that Flex 4 Users who want to render HTML should reconsider their technology choice.
How I can user <mx.HTML> into Flash mobile project?. I am using Flashbuilder 4.6 for Mobile App development.