With Flash content, it is traditionally not possible to display a fully rendered HTML website within an application. Adobe AIR initially changed this by allowing web pages to be loaded into the application on the desktop and interpreted through the internal AIR build of the web kit rendering engine through the desktop only HTMLLoader
class. On Android, AIR allows us to do similar things through the use of StageWebView
.
We will construct a new StageWebView
instance to display a web page within our mobile Android application:
1. First, import the following classes into your project:
import flash.display.Sprite; import flash.display.StageAlign; import flash.display.StageScaleMode; import flash.events.Event; import flash.events.TouchEvent; import flash.geom.Rectangle; import flash.media.StageWebView; import flash.net.URLRequest; import flash.net.navigateToURL; import flash.text.TextField; import flash.text.TextFormat; import flash.ui.Multitouch...