MX api movement
- Started
- Last post
- 14 Responses
- versa
I am embarrased to ask this question, but I need some help.
just trying to understand the simple logic of drawing a line from a higher number on the x axis to a lower number, e.g. 739 back to 0.
code that i use to draw the reverse (from 0 to 739) is like this:
this.createEmptyMovieClip ("lineBR", 10);
lineBR.lineStyle(1, 0x000000, 100);
lineBR.moveTo (0, 409);
lineBR.lineTo (0, 0);line_grow = function () {
endX = 739;
if (lineBR._width = 739){
lineBR._width = 739;
endline_grow ();
line_growUp();
}
}
updateAfterEvent ();
};endline_grow = function () {
clearInterval (lineSI);stop();
};lineSI = setInterval (line_grow, 30);
stop();
_______________________
all the numerical techniques i've tried to get the reverse to work, don't. this must be so simple.
thanks for the help
and don't laugh at me too hard
^_^
- unknown0
are you sre it sohuldn't be 1 rather than 0? is 0 off screen?
- versa0
woops..........wrong AS
this is how i work it for 0 to 739 say on the x axis.........
this.createEmptyMovieClip ("lineTL", 10);
lineTL.lineStyle(1, 0x000000, 100);
lineTL.moveTo (739, 0);
lineTL.lineTo (0, 0);line_grow = function () {
endX = 739;
if (lineTL._width = 739){
lineTL._width = 739;
endline_grow ();
line_growUp();
}
}
updateAfterEvent ();
};endline_grow = function () {
clearInterval (lineSI);stop();
};lineSI = setInterval (line_grow, 30);
stop();
- versa0
engage -
0 works on moving up the x axis, though i use 739 on a 740 stage for the spacial reasons you're talking about..........you must know how to do this.....
looks like you've got some solid AS skills
- versa0
anybody?
- versa0
uh.........come on people
- frankbb0
send me an .fla because the code you have wrote makes no sense...
you have this in an if statement which makes it equal it rather than check that it equals!!
if(_width=739){}
should be this if you want to check a width
if(_width==739){}
- frankbb0
you mean something like this
code :
this.createEmptyMovieClip("lineB... 10);
lineBR.lineStyle(1, 0x000000, 100);
lineBR.moveTo(0, 409);
lineBR.lineTo(0, 0);
line_grow = function () {
tagH = 0;
if (lineBR._height<=1) {
lineBR._height = 0;
endline_grow();
} else {
lineBR._height+=(tagH-lineBR._he...
}
};
endline_grow = function () {
clearInterval(lineSI);
stop();
};
lineSI = setInterval(line_grow, 30);
stop();: code
- enobrev0
hey versa, what's that chunk of code you posted supposed to do? I pasted it, got an error, fixed the error, and i get nothin.
After looking it over, I have no idea what it's doing.
- versa0
just supposed to draw a straight line on the x axis........didn't work huh
not sure
- enobrev0
this.createEmptyMovieClip ("lineTL", 10);
lineTL.lineStyle(1, 0x000000, 100);
lineTL.moveTo (739, 1);
lineTL.lineTo (0, 0);is all you need, and you do need to put it on px 1 in order to see it.
- enobrev0
im retarded:
this.createEmptyMovieClip ("lineTL", 10);
lineTL.lineStyle(1, 0x000000, 100);
lineTL.moveTo (739, 1);
lineTL.lineTo (0, 1);if you change the 1's to 5's you'll see that it's there
- frankbb0
what ever the desitation is minus the actual position ??
- versa0
frank -
just sent you the .fla
- versa0
frank -
did you get that .fla?
thanks for the help