Quick thing about Text files
Hey,
This is probably an easy question. Ok say you have a text file that contains simply this:
comment1=0
Now in Flash, at the click of a button, you want to store inside a variable, the number contained inside the text file but added by one. So in this case, it would store instead of a zero, a one.
So when you click the button, it would be something like:
code:
on (release) {
myText = new LoadVars();
myText.onLoad = function() {
numberComment = this.comment1;
inputComment = numberComment+1;
};
myText.load("text files/commentVariable.txt");
}
But when I run it, it just simply puts a zero (the number stored inside the text file) with a one beside it.
Any thoughts ?