Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to stay on same page when using the browser back button?

New Here ,
Nov 17, 2011 Nov 17, 2011

Hi,

I am facing the following problem. Please help me to resolve it.

I have a demo website consist of 3 pages.

1) Home_mc

2) Safety_mc

3) Portfolio_mc

The second page Safety_mc has some external links to .pdf & .jpg files. When I am on Safety_mc page and click a link it opens a pdf file in same window it is fine. But when I click on back button on web browser, it takes me to Home_mc instead of Safety_mc. How to resolve this problem?

Please help me.

Thanks in advance.

TOPICS
ActionScript
1.7K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 17, 2011 Nov 17, 2011

Have a look at SWFAddress, this is precisely what it's for:

http://www.asual.com/swfaddress/

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Nov 17, 2011 Nov 17, 2011

Your three "pages" are only 3 movieclips, right? Flash acts like a black box from browser's point of view. In HTML code, you only have a reference to your SWF file, what happens inside is invisible to the browser. So what you describe is normal behaviour.

However, you could use javascript to tell the browser "now I'm looking at this page.. and now I'm looking at this page", so javascript manipulates browser history - so when you click back button, there will be information about the page you were looking at in flash and javascript will tell your flash to show this particular page.

It's a bit advanced topic, but if you take your time and read all the instructions and samples you should do just fine.

SWFAddress: http://www.asual.com/swfaddress/

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Nov 17, 2011 Nov 17, 2011
LATEST

I hate it when I write answer 10 minutes...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines