Making the most of StageWebView
October 29, 2010
At first glance, the situation thus seems a bit grim. There are a variety of reasons why AIR for Android does not currently support HTMLLoader, probably none of which I am at liberty to discuss here. But, suffice it to say that Adobe is working on improving the situation.
And in the interim, all is not lost. For many use cases, StageWebView probably already suits most developers’ needs. And there are some things you can do with StageWebView that you simply cannot with HTMLLoader. For instance, because StageWebView employs the native Android WebKit under the hood, in most cases CSS 3
@font-face is supported out of the box (with TTF and OTF). This is something you currently don’t get with HTMLLoader on the desktop (which uses AIR’s own bundled WebKit).
This will invoke the function
myFunction into a loaded page:
document.location will cause the StageWebView to dispatch a
And on the ActionScript side:
Finally, it may be useful to know that any calls to
And that’s it! Hopefully this will help a few developers who are getting started with AIR for Android and need to work with advanced HTML content.