I have a series of lines , line1 being the first line, line21 being the last line, they are spread evenly across the stage.
I have a pointer triangle above them, using the same button, I fist want the pointer to slide to line 21, then on the second click I want the pointer to slide back to line1, I searched and found a bit…so I modified it to my use, but the pointer doesn’t stop at the ends, it just keeps going back and fourth…here is what I have:
button.onPress = function() {
this.onEnterFrame = function() {
if (pointer._x == line1._x) {
forward = true;
}
if (pointer._x == line21._x) {
forward = false;
}
if (forward == true) {
pointer._x += 20;
}
if (forward == false) {
pointer._x -= 20;
}
};
};
here is the fla…