Solved

If then logic from a text file!

Posted on 2002-05-17
3
165 Views
Last Modified: 2010-04-03
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
0
Comment
Question by:UberFreak
  • 3
3 Comments
 
LVL 5

Expert Comment

by:stef4s
ID: 7023359
ok write your textfile like this

&myvar=1


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

gotoAndPlay(2);
}


0
 
LVL 5

Accepted Solution

by:
stef4s earned 135 total points
ID: 7023362
to make sure that your syntax is correct use the help file bundled with flash. to vrify command etc.
0
 
LVL 5

Expert Comment

by:stef4s
ID: 7023580
also remember that on the internet you might need to give the loadvariables command some time to download the file.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question