Link to home
Start Free TrialLog in
Avatar of lostacogrande
lostacogrande

asked on

"Simple" back-button in flash (to goto previous html page)

this shouldnt be hard but i cant seem to get it to work nor find a solution. hopefully someone here can help.

i have a flash navigation menu in multiple html pages and would like to have 'back' and 'forward' buttons on it for the user to get around with (the site is opening in a window without browser buttons).

ive tried using just plain javascript

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

with variations on the history syntax (ie 'history.back()'). this works fine if you only want to go back one page but it will not go back any further (nor will it go forward and appears to mess up the history and crashes the browser if you try to use the alt arrow keys to browse the history). crazy.

so i tried calling to a separate function from within the .swf

function BINGO() {
 history.go(-1);
}

without any luck either. macromedia says its easy to do but doesnt go into any details on how to get it to work and im a little baffled.

thanks
Avatar of rascalpants
rascalpants
Flag of United States of America image

I had the same problems as you did with all of your solutions, and I could only get the browser to jump back a page if I "double clicked" on the button.  

you might be able to use the FScommand as stated in the below url to run a Javascript...

http://www.macromedia.com/support/flash/ts/documents/java_script_comm.htm

let me know what you find out...

rp
ASKER CERTIFIED SOLUTION
Avatar of rootdir
rootdir

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Rootdir...

you just posted the same answer that I did.  you just copied the text from the my url...  

And LOST and I have already determined that using the window.history.go(-1) or window.history.back... etc. does not work unless you double click on the button. And even then, the forward button does not work...

please post some new information...

rp
Avatar of gooffer
gooffer

gooffer,

you just posted a url for a web page that is french... if you have not noticed we are typing in english...  And after reviewing the page images, it does not even look like it involve the back or forward buttons...

rp
Avatar of lostacogrande

ASKER

very cool;

i had just come across the fscommand and alomost had int working when you posted your answer. it works great now and works better than the _root function (all the flash files are built already) so all i need to do is update the html and the javascript files.

thanks again for being an expert.

Los Taco Grande
I got screwed again!  next time I will just wait for others to post their answers and I will copy exactly what they post and hope to take credit...

it seems to work out that way on these boards...

rp