views:

98

answers:

4

Does anyone know if there's a Flash (ActionScript) library for providing back button support?

The GotMilk site does this. I was hoping there's a Flash library for this so I can provide and train a customer of mine to utilize this technique to build a whole site in flash.

http://gotmilk.com/ http://gotmilk.com/#/gotmilkbrand/

A: 

I don't know of a library, but I imagine it hooks in with JavaScript to update the window.location.hash property.

alex
A: 

You may want to look at this article. It describes how you can implement deep linking in Flash using the hash of the page's URL.

I've used deep linking in one of my Flex applications. It is a nice way of not-only supporting the back/forward button, but also to allow "pages" of your flash to be bookmarked and linked to.

Jacob
A: 

I know that Flex can do this using, well, here's some sample code:

Using the browser history to track application state changes

I never did implement this in my Flex application, but I kept planning to (until the project was canceled).

marcc
+1  A: 

One of the best solutions is SWFAddress:

http://www.asual.com/swfaddress/

You just need to include the javascript on your page and register a listener with the SWFAddress.as class. Download the full package on the site; there's a few really good demos. Quite easy to implement if you structure your Flash site well.

Here are some example in which I've used it recently:

http://gravisfootwear.com/

http://pth.amnestyusa.org/

Typeoneerror