mhstudio
03-03-2005, 07:29 PM
i have aproblem i have a txt (variables.txt)with the following code:
&x0=0&y0=100&xf=100&yf=200
the in the first frame the following code:
loadVariables("variables.txt","controller")
stop()
in the second frame the following code to create a line, :
x0=_root.controller.x0;
y0=_root.controller.y0;
xf=_root.controller.xf;
yf=_root.controller.yf;
_root.createEmptyMovieClip("line", 1);
with (line) {
lineStyle(1,0x000000,100);
moveTo(x0,y0);
lineTo(xf,yf);
}
stop();
from here i don't have problems, the line is drawed,now comes the problem i want to add a counter to create various lines
like that:
counter=1;
x0=_root.controller.x0+counter;
y0=_root.controller.y0+counter;
xf=_root.controller.xf+counter;
yf=_root.controller.yf+counter;
_root.createEmptyMovieClip("line", 1);
with (line) {
lineStyle(1,0x000000,100);
moveTo(x0,y0);
lineTo(xf,yf);
}
stop();
and the new txt is like this:
&x01=0&y01=100&xf1=100&yf1=200
but i can't draw the line now, what's wrong?
&x0=0&y0=100&xf=100&yf=200
the in the first frame the following code:
loadVariables("variables.txt","controller")
stop()
in the second frame the following code to create a line, :
x0=_root.controller.x0;
y0=_root.controller.y0;
xf=_root.controller.xf;
yf=_root.controller.yf;
_root.createEmptyMovieClip("line", 1);
with (line) {
lineStyle(1,0x000000,100);
moveTo(x0,y0);
lineTo(xf,yf);
}
stop();
from here i don't have problems, the line is drawed,now comes the problem i want to add a counter to create various lines
like that:
counter=1;
x0=_root.controller.x0+counter;
y0=_root.controller.y0+counter;
xf=_root.controller.xf+counter;
yf=_root.controller.yf+counter;
_root.createEmptyMovieClip("line", 1);
with (line) {
lineStyle(1,0x000000,100);
moveTo(x0,y0);
lineTo(xf,yf);
}
stop();
and the new txt is like this:
&x01=0&y01=100&xf1=100&yf1=200
but i can't draw the line now, what's wrong?