thetainteractive.utilities.History
"History" — a wrapper class for unfocus’s HistoryKeeper. We use flash, and unfocus is cool. The FlashSuite is way too complicated, especially since ExternalInterface is on the scene. So, using ExternalInterface, and HistoryKeeper, we now have a super clean, super easy to use Flash-Based-History-System.
this method calls the start method. it starts up the history class in both AS and JS. If a bookmarked hash is in the URI or the browser, it will default to that when it starts up, otherwise, it will use the hash you specify as the hash parameter
param hash:String
the starting hash key you want to start the site with. will be over-ridden by the browser URI if there is a bookmark.
Sets a history state in both AS and JS. will only broadcast to subscribers if there is a change in the hash. duplicate hash calls will be ignored.
param hash:String
the hash to set as the current hash
Example: if you wanted to load in a paticular bit of content, say "my-content-bucket-2a5f7e", you could load it as the current content in Body by doing this:
sends back the current hash that the class is working with
return:String
the current hash
Add a subscriber to the "history" event. any time the current history state changes, the listener will be notified of the new hash. it is up to this/these listeners to parse the hash and render ths scene.
param obj:Object
the object that will recieve "history" events
Remove a subscriber to the "history" event.
param obj:Object
the object to remove