|
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 )
|