It is a common problem that a back button not working w??? you using Flex on you site Charlie Key shows how to solve this problem in his new article poste on the Switch on the Code site. He write:
«So, how many times have you and I read something on the web that says you shouldn't use Flash/Flex because it breaks the back button? Well I for one say fooey to this. Today I am going to show you how to fix the back button in Flex 3 and add states to the browser history. Inside the Flex 3 framework there is a nice gem that can be used, it is a singleton (for more info check out our Singleton Tutorial) class called BrowserManager. This class allows us to change the url and receive notices when the user or browser changes the url.
So let's take a look at the example that we are going to build today. Below we have a simple application that have three buttons in the docked control bar at the top of the application area. Each of these buttons will change the color of the main area. But the magic happens when each one of these buttons is pressed you will notice the url in the browser also updates. It will change the ending of the url to reflect the current index of the selected area. You should now also be able to use your back button to go back to previously selected areas. Now the amazing thing is how simple it is to do this. Easier than doing this by using straight Javascript that is for sure. Ok, take a minute and play around. You can also examine and grab the BrowserManager Example Source.»
You can read the full version of rhis article on the Switch on the Code site.
Comments