im trying to do a very simple side scrolling background for a game- and it works perfectly- but i’d like to load up a different image after a while, so i made a “stitched” image (frame called transition) and a second background wall which i want to take over and replace the first one-
the wall itself is a 3 frame movie clip, the first wall, the stitch, then the second wall. here is my code:
if (Key.isDown(Key.RIGHT)) {
if (crouching == false) {
wall._x -= 10;
player_mc.gotoAndStop("walk");
if (wall._x<=800) {
walliteration++;
if (walliteration == 2) {
wall.gotoAndStop("transition");
transition = true;
}
if (transition == true) {
wall.gotoAndStop("wall2");
walliteration -= 50;
}
wall._x = 1600;
}
the var walliteration is supposed to count up everytime the scrolling background resets, so you walk for a while then it loads the second image… but its’ not working it just scrolls the first background image forever (which is wall.frame1)