Skip to main content
Inspiring
September 17, 2006
Question

Loading Variables from Text file

  • September 17, 2006
  • 5 replies
  • 328 views
I am workin in a quiz that i will load the questions from variables in a
text file and i have passed this mission.
The problem is that i have input txt fields in my movie that the user will
put answers and i want to compare these answers with variables in a txt file
too 🙂 is that valid and how can i please anybody reply me sooooon

Thank you


This topic has been closed for replies.

5 replies

Inspiring
September 18, 2006
Can any body Help
"Essam Maccar" <essam_maccar@hotmail.com> wrote in message
news:eek17l$eic$1@forums.macromedia.com...
> The Code is
>
>
> _root.loadVariables("ques.txt");
> and my input txts named as following
> name_txt
> email_txt
> phone_txt
>
> and the text file ques.txt read as following:
>
> &firstQ=What is your name?
> &secondQ=What is your email?
> &thirdQ=What is your mobile number?
> &answer1=Essam
> &answer2= my email
> &answer3=0124613121
>
> and i want to make a condition to compare between text input in the
> name_txt,email_txt and phone_txt and &answer1, &answer2 , &answer3 and
> that if ok gotoAndStop(where the next ques is) ;
> Thank you Kglad
>
> "kglad" <webforumsuser@macromedia.com> wrote in message
> news:eek0b7$dni$1@forums.macromedia.com...
>> what code do you use to load your text file's variables/values and what
>> answer (1,2 or 3) do you want to text against when your submit_btn is
>> released?
>>
>
>


Inspiring
September 17, 2006
The Code is


_root.loadVariables("ques.txt");
and my input txts named as following
name_txt
email_txt
phone_txt

and the text file ques.txt read as following:

&firstQ=What is your name?
&secondQ=What is your email?
&thirdQ=What is your mobile number?
&answer1=Essam
&answer2= my email
&answer3=0124613121

and i want to make a condition to compare between text input in the
name_txt,email_txt and phone_txt and &answer1, &answer2 , &answer3 and
that if ok gotoAndStop(where the next ques is) ;
Thank you Kglad

"kglad" <webforumsuser@macromedia.com> wrote in message
news:eek0b7$dni$1@forums.macromedia.com...
> what code do you use to load your text file's variables/values and what
> answer (1,2 or 3) do you want to text against when your submit_btn is
> released?
>


kglad
Community Expert
Community Expert
September 17, 2006
what code do you use to load your text file's variables/values and what answer (1,2 or 3) do you want to text against when your submit_btn is released?
Inspiring
September 17, 2006
How Please give me an example

"kglad" <webforumsuser@macromedia.com> wrote in message
news:eejo0m$4sd$1@forums.macromedia.com...
> you can use the flash string methods to compare the variables/values from
> your text file with the text property of your textfields.


kglad
Community Expert
Community Expert
September 17, 2006
if you use a LoadVars() object with instance name yourLV and if your text file contains variables/values like:

&answer1=this is the answer to the first question&
&answer2=this is the answer to the2ndquestion&
etc

you can use something like:


kglad
Community Expert
Community Expert
September 17, 2006
you can use the flash string methods to compare the variables/values from your text file with the text property of your textfields.