jbuk27
02-05-2007, 12:21 PM
Hi,
I need to make a movieclip traverse along the x coordinate by using a simple .txt file with a number in it. For example, if my text file had a 1 in it, the MC would be something like: this.test_mc._x= 100; and a 2, this.test_mc._x= 200; and so on (up to ten times). Can anyone help, I'm getting lost with this one.
This is the code I have cobbled together, but obviously doesn't work:
var txtfile = new LoadVars();
txtfile.load("test.txt");
if (txtfile="1") {
this.test_mc._x= 100;
}
if (txtfile="2") {
this. test_mc._x= 200;
}
Many thanks
JB
I need to make a movieclip traverse along the x coordinate by using a simple .txt file with a number in it. For example, if my text file had a 1 in it, the MC would be something like: this.test_mc._x= 100; and a 2, this.test_mc._x= 200; and so on (up to ten times). Can anyone help, I'm getting lost with this one.
This is the code I have cobbled together, but obviously doesn't work:
var txtfile = new LoadVars();
txtfile.load("test.txt");
if (txtfile="1") {
this.test_mc._x= 100;
}
if (txtfile="2") {
this. test_mc._x= 200;
}
Many thanks
JB