Link to home
Start Free TrialLog in
Avatar of UberFreak
UberFreak

asked on

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

Regards
Avatar of stef4s
stef4s

ok write your textfile like this

&myvar=1


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

gotoAndPlay(2);
}


ASKER CERTIFIED SOLUTION
Avatar of stef4s
stef4s

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
also remember that on the internet you might need to give the loadvariables command some time to download the file.