Frage
Loading from a text file
I have the follwoing code to load from a text file. My text
files are in pairs.
The code i have in my first frame is as follows.
myData = new LoadVars();
myData.onLoad = function() {
lu.Recsign = this.myvariable;
};
if (loadlang = "UK") {
myData.load("UK.txt");
}
if (loadlang = "IT") {
mydata.load ("IT.txt") ;
}
english_btn.onPress = function() {
loadlang=("UK");
langIdx = 0;
updateDisplay();
gotoAndPlay(3);
};
italian_btn.onPress = function() {
loadlang=("IT");
langIdx = 1;
updateDisplay();
gotoAndPlay (3)
};
however whats happening is, it only ever picks up the UK file. I have tried commenting out the uk lines and just using the second part of the if statement, but the produces undefined. I know both text files are named correctly, i think its a problem with my if statement. Can anybody help?
The code i have in my first frame is as follows.
myData = new LoadVars();
myData.onLoad = function() {
lu.Recsign = this.myvariable;
};
if (loadlang = "UK") {
myData.load("UK.txt");
}
if (loadlang = "IT") {
mydata.load ("IT.txt") ;
}
english_btn.onPress = function() {
loadlang=("UK");
langIdx = 0;
updateDisplay();
gotoAndPlay(3);
};
italian_btn.onPress = function() {
loadlang=("IT");
langIdx = 1;
updateDisplay();
gotoAndPlay (3)
};
however whats happening is, it only ever picks up the UK file. I have tried commenting out the uk lines and just using the second part of the if statement, but the produces undefined. I know both text files are named correctly, i think its a problem with my if statement. Can anybody help?
