As a user browses, visited pages are stored in the browsing history stack. The StageWebView
class makes it possible to move through the browsing history and also detect when location changes take place.
This recipe will take you through the necessary steps to create a simple app that allows a user to navigate their page history as they browse.
You will need Flash Professional CS5.5 for this recipe.
An FLA has been provided as a starting point. From the book's accompanying code bundle, open chapter11\recipe3\recipe.fla
into Flash Professional CS5.5.
Sitting on the stage are two movie clips that represent navigation buttons. We will use these to move backwards and forwards through the user's history stack. The first has an instance name of backBtn
, while the second is named forwardBtn
.
Both movie clips are linked to a base class named Button
. This class was introduced in the Handling user interaction recipe from Chapter 4.