I’ve been banging my head trying to get this to work, it seems soooooo simple
basicaly I’m loading a variable from the .txt file, and it loads fine, but where I’m having trouble is the second part with my if statements. no matter what the variable is, it always traces “ont-ok” ie if my variable in the text file is “ma” my output window shows-
ma
“ont-ok”
instead of-
ma
“ma-ok”
myVars = new LoadVars();
myVars.onLoad = function(success) {
if (!success) {
trace("Failed to load");
} else {
myVariable1 = myVars.prov;
trace(myVariable1)
}
if(myVariable1 = ont){
trace("ont-ok")
}
else if(myVariable1 = ma){
trace("ma-ok")
}
else if(myVariable1= bc){
trace("bc-ok")
}
}
myVars.load("mapid.txt");
I’m sure it’s extremely simple but I’m just over looking something.
thanks in advance.