Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

recognizing valid text file variables

Status
Not open for further replies.

sVanderbutte

Programmer
Mar 4, 2002
7
US
what i'm trying to do is be able to allow a user to specify a text file containing variables through an input box, and flash be able to default to variables if the text file is not found. for instance, if a user input "file.txt", and there was no such file, then flash could display a 'file not found' or whatever. what i currently have on a button
is similar to this:

on(release){
filename = inputBox;
input = (inputBox + ".txt");
if(input == ".txt"){
var1 = x;
var2 = x2;
var3 = x3;
gotoAndPlay("wherever");
}else{
_root.loadVariables(input, _root);

gotoAndPlay("wherever");
}
}

i basically need a: if (file != true) kinda thing.

thanks in advance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top