Donate
 
Has KnowFlash helped you?

Donate towards running costs:


Why donate?

Newsletter
Sign up to our newsletter:
 
Enter your email address:
 
flash menu
Tutorials
Video Tutorials
Store
Main Menu
Home
News
Forum
Help/FAQ's
Contact Us
Search
Register
Advertise
Links
Webmasters

Easy Back Button Print E-mail
Written by Rawpulse   
Saturday, 12 November 2005
A fast and simple way to make a "back" button, which takes the user back to the previous page.
 

You see them all the time, but this is the way to do it in Flash.

So to start off, make your button, if you don't know how, follow the various button tutorials we have.

Once it is created, go back to Scene 1, and select your button. Open the Actions panel and enter the following code.

on(press, release){
getURL("javascript:history.go(-1)");
}

This code states that both press and release actions are active within the on state. The "press" checks the history, and the "release" performs the action to move back.

The second line of the code uses the getURL function used when linking to a site. It states that Javascript will be used (which means browsers must have Javascript enabled). The history goes "-1" or back 1, which takes the user to the previous page.



Last Updated ( Friday, 24 February 2006 )
< Prev

In association with Coursework Essays , Free Essays , Phishing Scams and Big Red Directory

Copyright Oxford Information Services Ltd 2007


Small business IT
Connect is the market leader in IT support for small and medium sized businesses and organisations across the UK.