I know this should be simple but I REALLY can’t work out what I’m doing wrong. I have an FLA that features one long movieclip made up of equal sized blocks of colour each the same width as the stage and all I want to do is to ‘slide’ the mc along by one section each time the next (or previous) button is pressed. Some folks have helped me out so that it scrolls if you keep pressing the button but that’s really only half way to what I want. I’m going nuts here. Can anyone put me out of my misery please?
This is the AS I’m using in the first keyframe.
stop();
var moveright:Boolean = false;
var moveleft:Boolean = false;
m_Box.onEnterFrame = function() {
if (this._x > -1920 && moveleft == true) {
this._x -= 20;
} else {
this._x = this._x;
}
if (this._x < 0 && moveright == true) {
this._x += 20;
} else {
this._x = this._x;
}
};
btn_Next.onPress = function(){
moveleft = true;
};
btn_Next.onRelease = function(){
moveleft = false;
};
btn_Previous.onPress = function(){
moveright = true;
};
btn_Previous.onRelease = function(){
moveright = false;
};