im trying to get 2 movieclips to put there self above eachother when the other reachs the bottom of the stage
but it does not meet line to line, the stage width is 480 and height 800
and it gets faster and faster
import flash.events.Event;
stop();
function repeatBackground():void {
if(gameBackground01.y + gameBackgroundY > 799) {
gameBackground01.y = -800;
}
if(gameBackground02.y + gameBackgroundY > 799) {
gameBackground02.y = -800;
}
if(gameBackgroundY > 799) {
gameBackgroundY = 0;
}
gameBackgroundY++;
}
function gameLoop(e:Event):void {
if(gamePause == 0) {
repeatBackground();
gameBackground01.y += gameBackgroundY;
gameBackground02.y += gameBackgroundY;
} else {
}
}
gameBackground01.x = 0;
gameBackground01.y = -800;
gameBackground02.x = 0;
gameBackground02.y = 0;
addEventListener(Event.ENTER_FRAME, gameLoop);