# Problem with loading external vars

**URL:** <https://forum.kirupa.com/t/problem-with-loading-external-vars/59667>\
**Category:** flash\
**Created:** [August 2, 2004, 9:31pm UTC](https://forum.kirupa.com/t/problem-with-loading-external-vars/59667 "2004-08-02T21:31:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bpnewell9](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@bpnewell9](https://forum.kirupa.com/u/bpnewell9)\
**Post date:** [August 2, 2004, 9:31pm UTC](https://forum.kirupa.com/t/problem-with-loading-external-vars/59667/1 "2004-08-02T21:31:13Z")

</div>

I need a bit of help.

I’ve developed a game based on Who Wants to Be A Millionaire. I’m trying to load the questions via an external .txt file. In addition to the question and answer, I have a variable that has the number of the correct answer located in the text file.

After you select your answer and you click on the Yes button, it evalutes whether your answer is the same as the correct one. This kicks of fone of two movies, depending on your movie. But I can’t get the evaluation to work.

I’d be happy to share the files if anybody could help.

Thanks,

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 2, 2004, 9:38pm UTC](https://forum.kirupa.com/t/problem-with-loading-external-vars/59667/2 "2004-08-02T21:38:04Z")

</div>

Here is some of the code I have:

**For the evaluation:**  
on (release) {

if (test1 == correct1) {  
answer.gotoAndPlay(1);  
right.gotoAndPlay(2);  
} else {  
answer.gotoAndPlay(1);  
wrong.gotoAndPlay(2);  
}  
//trace(test1);  
//trace(correct1);  
}

**Loading the text:**  
nophone.\_visible=false;  
noaudience.\_visible=false;  
no5050.\_visible=false;

loadText = new LoadVars();  
loadText.load(“round1.txt”);  
loadText.onLoad = function() {  
question1.text = this.question1;  
answer1.text = this.answer1;  
answer2.text = this.answer2;  
answer3.text = this.answer3;  
answer4.text = this.answer4;  
\_global.correct1 = this.correct1;

};
