Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

16. Browser Communication > 16.8. Deep-Link Containers via BrowserManager

Problem

You need to control the visible contents of Flex 4 containers based on URL parameters.

Solution

Use the BrowserManager class and BrowserChangeEvents to control the visibility and track the history of Flex components.

Discussion

You can use the URL fragment to control and track which containers and components are visible within a Flex application. When the application loads, you initialize the BrowserManager class instance, which helps you parse and handle the browser URL. The updateContainers() method (shown in the following code segment) determines which of the tabs within the TabNavigator instance is visible. Any time that tab navigator’s visible tab changes, you set the selectedIndex property in the URL fragment by using the following snippet:


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint