i figured it out- this is the new code:

//walk button
if (Key.isDown(Key.RIGHT)) {
if (crouching == false && attack == false) {
if (mobattack == true && back == false) {
if (transition == true) {
wall.walltransition._x += 10;
} else {
wall._x += 10;
}
}
if (transition == true) {
wall.walltransition._x -= 10;
} else {
wall._x -= 10;
}
walking = true;
player_mc.gotoAndStop("walk");
if (transition == true) {
if (wall.walltransition._x<=-5600) {
wall.walltransition._x = -2400;
}
} else {
if (wall._x<=800) {
walkpoints++;
if (walkpoints>=4) {
wall.gotoAndStop("transition");
transition = true;
walkpoints = 0;
}
wall._x = 1600;
}
}
}
i reduced it from 3 different images to 2, and just used the MC within the first wall MC for the second one.