First time here? First time here? Newsletter Signup Newsletter
Login | Register | 651326 Members and growing!
Search tutorials
Author: Nathan Smith | Website:

Flash Back Buttons - unFocus History Keeper

Also see this tutorial at: http://www.mycreativecollective. com

This has been out for awhile now, but I haven’t seen a lot of tutorials showing how to implement it. This tutorial uses the unFocus History Keeper to add back button functionality to your flash sites. The unFocus History Keeper is great because it doesn’t use frames like one of the most used methods created by Robert Penner.

Demo & Introduction:
You can view this in action at Personally, I don’t know how many times I have been asked why the back buttons don’t work in the all flash site I have just created for a client. With this being said I really like this method because it works in most common browsers out there right now and with the popularity of Fire Fox growing everyday, this is a definite benefit.

How I came across the concept:
I first saw this was an option after it was posted on After looking into it more, I noticed that no one really had any idea how to make it work at first. In come the great people on the forums at the unFocus history keeper site who eventually worked the problem out.

Before you start:
First download the source files

Using the unFocus History Keeper:
Fist thing you need to do is copy the JavaScript folder into the root of your site. After this, start a new .fla and create two layers. Name the first layer: Back AS and the second one: Player Type. Next, insert the following code into the Back AS layer:

import flash.external.ExternalInterface;'unFocusHistoryUpdate', function(propName, oldValue, newValue) {
query_string_txt.text = propName + " || " + oldValue + " || " + newValue;
trace('watch: '+ newValue);
if (newValue == '') newValue = 'Home';
// reset the document title (set here so that it maintains
// the title even from a history recall)'History_setTitle', newValue);
return newValue;

_root.gotoNewSection = function (newSection) {
trace('gotoNewSection called');
// first add the history'History_addHistory', newSection);
// now update the state, otherwise the title gets messed up in the history
_root.unFocusHistoryUpdate = newSection;'History_setTitle', newSection);

if (typeof _root.unFocusHistoryUpdate == 'undefined') {
_root.unFocusHistoryUpdate = 'Home';


We want to put this code into the Player type layer:

_root.playerType = System.capabilities.playerType;


» Level Intermediate

Added: 2007-02-02
Rating: 10 Votes: 2
(10 being the highest)
» Author
I am the co-owner of Creative Forces, Inc.
» Download
Download the files used in this tutorial.
» Forums
More help? Search our boards for quick answers!


  • There are no comments yet. Be the first to comment!

  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.
Featured Flash FLA
» Author: Inocreato
» Title: RaiseTheBlocks
» Description: Raise all the blocks to win the game
Featured Sound Loops
Image for equalize

Audio Player

» Author: TomCat Carty
» Title: The Wood
» Description: Just a little game ending or it can maybe be looped. Recorders with music box and percussion to give the feel of well, I don't know, the woods? Free to use, just credit me. thank you
Latest Font
» Author: Fábio FAFERS
» Description: I created this font for free use. Everyone can apply it in personal or business texts. Its free, but I want to be communicated in case of business use. Donations are accepted to keep the project of free fonts alive! Thank you all
Featured Sound Fx
Image for equalize

Audio Player

» Author: Davisigner
» Description: Hmm... what to say about this one? It's reminiscent of the closing notes of the opening music from the Three Stooges done in a church organ style with a closing cymbal crash. I'll give this one away gratis, but feel free to check out my free loops and potential upcoming license-mandated ones over in the respective part of Flashkit.