Solved

If then logic from a text file!

Posted on 2002-05-17
3
188 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

624 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