Hihoshi
Technical User
- May 22, 2007
- 3
I'm writing a quiz game based on dynamic text using .txt files for my variables so that the questions and answers can easily be changed later on down the road.
My problem is that the button actionscript won't seem to use the .txt files.
This is my code:
on (release, keyPress "<Enter>") {
if (answer eq "page1answer1.txt") {
gotoAndPlay ("Scene 4", 1);
} else if (answer eq "page1answer2.txt") {
gotoAndPlay ("Scene 5", 1);
} else if (answer eq "page1answer3.txt") {
gotoAndPlay ("Scene 6", 1);
} else if (answer eq "page1answer4.txt") {
gotoAndPlay ("Scene 7", 1);
} else if (answer eq "page1answer5.txt") {
gotoAndPlay ("Scene 8", 1);
} else {
gotoAndStop ("Scene 3", 1);
}
}
Is something like this at all possible? Can I use the .txt files and still be able to have a text based answer?
Thank you for your consideration.
My problem is that the button actionscript won't seem to use the .txt files.
This is my code:
on (release, keyPress "<Enter>") {
if (answer eq "page1answer1.txt") {
gotoAndPlay ("Scene 4", 1);
} else if (answer eq "page1answer2.txt") {
gotoAndPlay ("Scene 5", 1);
} else if (answer eq "page1answer3.txt") {
gotoAndPlay ("Scene 6", 1);
} else if (answer eq "page1answer4.txt") {
gotoAndPlay ("Scene 7", 1);
} else if (answer eq "page1answer5.txt") {
gotoAndPlay ("Scene 8", 1);
} else {
gotoAndStop ("Scene 3", 1);
}
}
Is something like this at all possible? Can I use the .txt files and still be able to have a text based answer?
Thank you for your consideration.