the initial part of the code works fine, but for the life of me i can not figure out how to reverse what the first bit of code does. the second button sets the pointX value back to a 100 but only on the second click, but in doing so skips the nullification of the second onEnterFrame (useless). i can see why its going wrong but can’t fix it. any ideas?
thanks
[AS]pointX = 100;
draw = function (mcName, mcDepth, mtX, mtY, ltX, ltY) {
createEmptyMovieClip(mcName, mcDepth);
clear();
lineStyle(1, 0xF7C533, 100);
moveTo(mtX, mtY);
lineTo(ltX, ltY);
};
btn.onRelease = function() {
onEnterFrame = function () {
draw(“line1”, 1, pointX, 100, 20, 100);
if (pointX>=99 and pointX<=499) {
pointX = pointX-(pointX-500)*0.05;
} else {
pointX = 500;
this.onEnterFrame = null;
}
trace(pointX);
// --------------------------------
};
};
btn2.onRelease = function() {
draw(“line1”, 1, pointX, 100, 20, 100);
onEnterFrame = function () {
if (pointX >= 499 and pointX>=99) {
pointX = 100;
// pointX = pointX-(pointX-100)*0.05;
trace(“smaller”);
this.onEnterFrame = null;
}
trace(pointX);
};
};[/AS]