When developing applications for Android, AIR allows us to render complete websites through the use of theStageWebView class. We also can tap into the navigation history of our StageWebView
instance and apply that in different ways within our application.
Once a user has loaded a number of pages within our StageWebView
instance, we will be able to navigate back and forth through the navigation history:
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.LocationChangeEvent; 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; import flash.ui.MultitouchInputMode;
2. We will now declare two
Sprite
objects to...