A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: browser back button

  1. #1
    Senior Member
    Join Date
    Apr 2002
    Posts
    106
    gday , i am trying to make a 'back' button for a series of txt files i have in my movie ...
    i have created an array in the first frame with all the names of the files (pages) ..

    siteHistory = ["sco1" , "ac01" , "cc01" , "xc01"];
    var reportChoice;

    on my 'back' button i have ::

    on (release) { //go back to menu if on first selection
    if ( _root.reportChoice == "sc01" ) {
    gotoAndStop("menu");
    }
    for ( i=0 ; i <= siteHistory.length - 1 ; i++ ) {
    if ( siteHistory[i] == reportChoice ) {
    reportChoice = siteHistory[i-1];
    gotoAndStop("start"); //where my dynamic txt field is
    }
    }
    }

    any ideas where i am going wrong cause it dont work , i think maybe it has somehtin to do with actually going to the "start" label ??
    cheers !

  2. #2
    Senior Member
    Join Date
    Jul 2001
    Posts
    2,467
    Hi:

    I don't have time to go through (test) this, but if you copied and pasted your code, there is a typo that might be to blame:



    siteHistory = ["sco1" , "ac01" , "cc01" , "xc01"];
    var reportChoice;

    on my 'back' button i have ::

    on (release) { //go back to menu if on first selection
    if ( _root.reportChoice == "sc01" ) {
    gotoAndStop("menu");
    }
    for ( i=0 ; i <= siteHistory.length - 1 ; i++ ) {
    if ( siteHistory == reportChoice ) {
    reportChoice = siteHistory[i-1];
    gotoAndStop("start"); //where my dynamic txt field is
    }
    }
    }

    Just a thought.

    James
    He is risen!!!

  3. #3
    Senior Member
    Join Date
    Apr 2002
    Posts
    106
    thanks mate !!
    isnt it amazing how many hours you can spend on a typo

    that was it , cheers !

  4. #4
    Senior Member
    Join Date
    Jul 2001
    Posts
    2,467
    Been there many, many, times myself mate.


    Cheers,


    James
    He is risen!!!

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