If then logic from a text file!

Ok this may be an easy one but I havent learnt actionscript in flash as yet so here goes:

I have a text file that may contaion a var thats 1 or 0

I want to load the text file var and then if the var is one go to the next frame if the var is 0 then just stay on teh frame.
I figured I do something like

loadvariable ("text.txt")
if "thevariablinthetextfile" = 1
then goto frame 2

Can you give me your help?

And also if you can recomend any books on actionscripting please

Who is Participating?
stef4sConnect With a Mentor Commented:
to make sure that your syntax is correct use the help file bundled with flash. to vrify command etc.
ok write your textfile like this


loadvariables ("text.txt")
if (myvar==1){


also remember that on the internet you might need to give the loadvariables command some time to download the file.
All Courses

From novice to tech pro — start learning today.