A Flash Developer Resource Site

Results 1 to 20 of 20

Thread: Problem with back button

  1. #1
    Junior Member
    Join Date
    Aug 2004
    Posts
    12

    Problem with back button

    Hello...

    I need to have my back button go to the previously viewed scene/frame instead of simply the previous scene/frame. Someone suggested I store each move in an array and reference the button to the array. Main problem is I have absolutely no idea how to do this.

    Can anyone help?

    Thanks!

    P.S. I tried to search the forums but came up empty

  2. #2
    Who, What, Why ... ? Fraggs's Avatar
    Join Date
    Jul 2003
    Location
    Flashland .. where else ?
    Posts
    786
    Meh, simpler idea is:
    code:
    on(release){
    _root.mc.prevFrame();
    }



    Regards,

  3. #3
    Junior Member
    Join Date
    Aug 2004
    Posts
    12
    This will bring me back to the previously viewed frame or just the previous frame? (This is for a CD)

    Thanks!

  4. #4
    Who, What, Why ... ? Fraggs's Avatar
    Join Date
    Jul 2003
    Location
    Flashland .. where else ?
    Posts
    786
    Previous frame, whether it was viewed or not.

    Regards,

  5. #5
    Junior Member
    Join Date
    Aug 2004
    Posts
    12
    Ah...there's my problem...I need it to go to the previously viewed frame. I wish it were as simple as the previous frame!

    Thanks

  6. #6
    Who, What, Why ... ? Fraggs's Avatar
    Join Date
    Jul 2003
    Location
    Flashland .. where else ?
    Posts
    786
    Have you thought about naming your frames? Im assuming that not all your frames have back buttons on them and that when you click a back button it takes you to a relativce position compared to your current position. I.E, if your half way through the movie, and you press back, you go to the start, NOT 5 frames back.

    Regards,

  7. #7
    Junior Member
    Join Date
    Aug 2004
    Posts
    12
    This particular project has 20 scenes and more frames than I care to count! I have one main back button that I would like to navigate the entire movie the same way (i.e. the previously viewed frame). For me to simply assign a back frame number would require guessing where they just were.

    Like I said, I wish it were simpler!!!

    Thanks again for the reply

  8. #8
    Who, What, Why ... ? Fraggs's Avatar
    Join Date
    Jul 2003
    Location
    Flashland .. where else ?
    Posts
    786
    You might be able to make a function, and just call the function when the button is pressed.

    Regards,

  9. #9
    Junior Member
    Join Date
    Aug 2004
    Posts
    12
    I'm trying to find the easiest way possible to make this back button function the way I want it to. I've been fighting with arrays for about 5 hours now and my head hurts! I'm very unfamiliar with arrays (although I have gone over some tutorials) so if anyone out there can help me it would be very much appreciated!

    Thanks!

  10. #10
    a small country village Trefor's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    328

  11. #11
    a small country village Trefor's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    328
    not sure about the quality of my script but here is one I knocked up
    Attached Files Attached Files

  12. #12
    Junior Member
    Join Date
    Apr 2003
    Posts
    3
    Hey guys,

    Is there anyway to use the explorer back button this way? That would solve a great many things for me!
    I know this might have been asked before, but i can't really find anything about it..

  13. #13
    Junior Member
    Join Date
    Aug 2004
    Posts
    12

    File won't open

    Hmmm....thought I posted this last night...let's try it again.

    Thanks for the attached file...when I try to open it I get an error message saying it is an unexpected file format. Dont' know why this is happening. Anyone else having that problem?

    Thanks!

  14. #14
    a small country village Trefor's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    328
    ok tried it as a zip file
    ignore the fwd button haven't finished it yet
    Attached Files Attached Files

  15. #15
    a small country village Trefor's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    328
    I think maybe both buttons work now..
    Attached Files Attached Files

  16. #16
    Junior Member
    Join Date
    Aug 2004
    Posts
    12
    Thanks again but I still can't open the file. The zip is fine but when I try to open the .fla in flash it tells me it is an unexpected file format. Any idea what it could be?

  17. #17
    a small country village Trefor's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    328
    Absolutely no idea but

    just installed 7.2

    and resaved as 2004
    and as MX

    give em a go
    Attached Files Attached Files

  18. #18
    Junior Member
    Join Date
    Aug 2004
    Posts
    12
    It worked! Thanks a mil!

  19. #19
    a small country village Trefor's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    328
    no prob..

    didn't test it properly.. so code might be a bit iffy..

    hope it helps

  20. #20
    Junior Member
    Join Date
    Aug 2004
    Posts
    12
    Trefor,

    Looks like you may be my hero! I am working on MX and that version opened. The buttons seemed to be functional. I'll be playing with the coding again tomorrow to see how it fits in with my project.

    Once again, thank you so much for all your help!

    Bizechick

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