johnny_cat
01-20-2006, 09:33 PM
I'm trying to create previous and next buttons.
I have a MC that slides across the stage. The next button works perfectly, but then the previous gets all screwed up and will jump sections. Any help would be appreciated. or if there is a better way to code this.
this code is on the "next" button
on (release) {
if (mc._x>=0) {
mc.endX = -336;
} else if (mc._x>=-336) {
mc.endX = -673;
} else if (mc._x>=-673) {
mc.endX = -1016;
}
}
this code is on the "previous" button
on (release) {
if (mc._x >= -336) {
mc.endX = 0;
} else if (mc._x >= -673) {
mc.endX = -336;
} else if (mc._x >= -1016) {
mc.endX = -673;
}
}
I have a MC that slides across the stage. The next button works perfectly, but then the previous gets all screwed up and will jump sections. Any help would be appreciated. or if there is a better way to code this.
this code is on the "next" button
on (release) {
if (mc._x>=0) {
mc.endX = -336;
} else if (mc._x>=-336) {
mc.endX = -673;
} else if (mc._x>=-673) {
mc.endX = -1016;
}
}
this code is on the "previous" button
on (release) {
if (mc._x >= -336) {
mc.endX = 0;
} else if (mc._x >= -673) {
mc.endX = -336;
} else if (mc._x >= -1016) {
mc.endX = -673;
}
}