dcsimg
A Flash Developer Resource Site

Page 1 of 2 12 LastLast
Results 1 to 20 of 26

Thread: History Back Button

  1. #1
    Member
    Join Date
    Jan 2001
    Posts
    46

    History Back Button

    Hi

    I am making a presentation which has numerous scenes. I want to
    place a back button which will perform as a history back button
    in any web browser.

    Pls. help.

  2. #2
    The world goes - hm.. TheCaramella's Avatar
    Join Date
    Dec 2001
    Location
    Second door on the right, next to the ice bear
    Posts
    642
    I have done it, and there where a few problems. First the code:
    Code:
    on (press, release) {
      getURL("javascript:history.back()");
    }
    Internet Explorer (MSIE) does nothing before the button's been hit twice when I place the code just on release or press. Netscape takes it at once. If you use the code with both release and press, MSIE reacts as expected, but Netscape/Opera jump two steps back.
    I suggest you use named anchors in your movie, then the user can navigate the movie with the browser's back button.

  3. #3
    Member
    Join Date
    Jan 2001
    Posts
    46
    My presentation will be offline. I will run a exe, but if I use this script it opens browser windows which doesnot serve the purpose.
    Pls. help.

  4. #4
    The world goes - hm.. TheCaramella's Avatar
    Join Date
    Dec 2001
    Location
    Second door on the right, next to the ice bear
    Posts
    642
    Sorry, didn't get that. All getURL-actions opens browser windows, that's in their nature. But then, if it's only inside the movie, you use this code:
    Code:
    on (press, release) {
        prevFrame();
    }

  5. #5
    Member
    Join Date
    Jan 2001
    Posts
    46
    I want to navigate within my scenes - say for eg. I am in scene
    50 and I went there by clicking a link in scene 38, now if I click my "history back" button it will take me to scene 50 not 37.

    Can u help me one more time?

  6. #6
    The world goes - hm.. TheCaramella's Avatar
    Join Date
    Dec 2001
    Location
    Second door on the right, next to the ice bear
    Posts
    642
    You know how to use labels? That's the best way of navigating inside a movie. I prefer having a spesial layer with labels in it, so I know easily where (and what!) my labels are.
    Then this code will work:
    Code:
    on (press, release) {
    	gotoAndStop("end");
    }
    When you use labels, you don't have to update all your links if your movie's length is changed later on.

  7. #7
    Senior Member
    Join Date
    Feb 2001
    Location
    On the fifth floor.
    Posts
    1,202
    I would advise to use separate swf files instead of stages. And then you can refer to history. Take a look at the sample in attached file.
    Attached Files Attached Files

  8. #8
    The world goes - hm.. TheCaramella's Avatar
    Join Date
    Dec 2001
    Location
    Second door on the right, next to the ice bear
    Posts
    642
    History? In the standalone player?

  9. #9
    Standrard flasher
    Join Date
    Jul 2002
    Location
    Stockholm
    Posts
    342
    i think the best way is that everytime you click a link to another section, you set a variable e.g. referer to the current page. then when you get to the new page and click the back button it checks if the referer is e.g. section 1, it will go to section 1, if the referer is section 2, the same button will take you to section 2.

    all this is only necessary if there are multiple ways to get to the section. let me know if you need the actionscript to do this!

  10. #10
    Senior Member
    Join Date
    Feb 2001
    Location
    On the fifth floor.
    Posts
    1,202
    Why not? You know that everything and everybody
    has his own history. Just take a look.

  11. #11
    The world goes - hm.. TheCaramella's Avatar
    Join Date
    Dec 2001
    Location
    Second door on the right, next to the ice bear
    Posts
    642
    Originally posted by sergwiz
    Why not? You know that everything and everybody
    has his own history. Just take a look.
    Haven't got time for looking. Has the standalone player really a history- and back possibility, except for previous FRAME? I'm curious

  12. #12
    Senior Member
    Join Date
    Feb 2001
    Location
    On the fifth floor.
    Posts
    1,202
    Are you kidding? You do have time for writing but you have no time for looking?
    It's really funny. I'm more than curious.

  13. #13
    The world goes - hm.. TheCaramella's Avatar
    Join Date
    Dec 2001
    Location
    Second door on the right, next to the ice bear
    Posts
    642
    I'd rather like you to explain to me what you mean. I'm not interested in downloading lots of files, going through code, finding out what's what. Then I can use the help file, but they don't say anything about "history" in the stand alone player. Why don't you just explain, instead of harassing me? This is not a forum for insults and stupid behaviour, this is for people who seek and give support when they're stuck!

  14. #14
    Junior Member
    Join Date
    Aug 2000
    Location
    Amsterdam Holland
    Posts
    25
    I think the best thing for you to do (to make browser-like history buttons in a standalone player) is to make an array which remembers where you've been. At first make an empty array. Then with each scene you enter, you must push a number in the array (the number of the scene would be handy). With the forward and back buttons you can then get the information out of the array. It's very simple and works perfectly, it just takes some coding.

    I hope this answers your question.

    I don't know about your coding skills, but with average coding capabilities you should be able to pull this one off.


    Greetings
    Dave Lenz
    ---------------
    Dave Lenz a.k.a
    Ypmits
    info@ypmits.nl
    ---------------

  15. #15
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Now...Now...Kids!

    Did this a while back, never got to work on a foward button, but I guess it could be done in a similar manner.

    http://odin.prohosting.com/~oldnew/f...ting/back4.swf

    http://odin.prohosting.com/~oldnew/f...ting/back4.fla

    If you want to use the browser's back button, you might want to check this:

    http://www.robertpenner.com/experime...ackbutton.html

  16. #16
    Mod cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    If you give a presentation you usually use a certain route in your presentation. On each page make two buttons: one to go to a menu (common point) and one which when pressed let you go where you came from using frame labels. I would not use so many different scenes which is confusing instead as already suggested swfs.
    - The right of the People to create Flash movies shall not be infringed. -
    | www.Flashscript.biz | Flashscript Biz Classes/Components |

  17. #17
    Senior Member
    Join Date
    Feb 2001
    Location
    On the fifth floor.
    Posts
    1,202
    TheCaramella, you are a strange person. I am offering a real help, real things, real support, but you refuse it and are offering just bla-bla words that don't mean anything. I'm sure that if I'll try explain anything with my poor English, nobody understands me. I speak English not too good. Explanations you can read in help file. That's why I am sending the examples.
    Having seen is better than having heard. Seeing is believing.
    By the way have you read in the help file about "fade_in_out" buttons? I doubt it. So I had to send the example of it for you twice. Do you remember?
    oldnewbie is like me just harassingh you by offering some examples without explanations.
    Ypmits and Cancerinform are offering real things. Their advices are wise.

  18. #18
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Excuse me?

    Harassing you without explanations?

    I posted a .fla and a link to another one!

    Do you want us to do the complete job for you? Or what?

  19. #19
    Senior Member
    Join Date
    Feb 2001
    Location
    On the fifth floor.
    Posts
    1,202
    Yes, oldnewbie. You are right.
    It seems to me that he does not want to see your, my or anybody's fla(s). He cannot read the code and even does not make any attempt to understand it. He wants somebody to explain everything to him. And it would be much better if somebody do complete job for him. Otherwise it is harassment.

  20. #20
    The world goes - hm.. TheCaramella's Avatar
    Join Date
    Dec 2001
    Location
    Second door on the right, next to the ice bear
    Posts
    642
    Guys, I think we're misunderstanding each other quite a bit here. Are many of us speaking English in our everyday life at all? I don't, so I can have misunderstood, but I still haven't got the answer that I asked for: do you have a history function in a stand alone Flash player?
    That was my only question. And I think that if people feel for criticizing each other here, please contact your "victim" directly. If people think I have stupid opinions, just answer questions the correct way, and don't spend time and other peoples time arguing!
    oldnewbie - relax! We're not having a war here! I'm not ungrateful! But the question was never the browser. As you might see, this thread is not initiated by me, it's started by another guy, who first asked one thing, then he found words for being more specific, and after a few rounds, we got to this: he wanted to know if there's any back function in a stand alone browser.
    And now you guys are attacking me?! That's not fair!
    sergwiz - you still haven't answered my question: history in a stand alone browser! I'm still hoping you'll be sensible and polite enough to answer that question. I get the impression you don't have an answer, and that you're taking the opportunity to attack me for making it show when asking these questions. I will imediately stop thinking that if you just answer my question, politely, and without attacking me. I find it extremely uncomfortable, because I haven't done anything to deserve that.
    Look at my postings! I've been creating files for many people, answering here and there, asking questions, shared with others if i found a solution.
    I don't think this is an ok way to behave at Flash kit. The only reason why I care for spending so much time here, is that this forum is free of what I experience today. That behavior is in so many places for very young boys on the web. I'm not interested. I think I've got something to contribute with, and won't take people "yelling" at me just because I ask a question they can't answer!
    Please re-read this thread, and try to see what is originally asked for.
    And let's behave, or I'm outta here.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center