-
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 !
-
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!!!
-
thanks mate !!
isnt it amazing how many hours you can spend on a typo
that was it , cheers !
-
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|