Looping, scrolling background.. Help!

i have this background mc i want to go in a loop, and not just stop when i reach the end of the mc … how do i do that


import flash.geom.Rectangle;
import flash.events.Event;

var bounds:Rectangle = new Rectangle(0, 0, stage.stageWidth, stage.stageHeight);

addEventListener(Event.ENTER_FRAME, enterF);

function enterF(e:Event):void{
    if(mouseX >= (stage.stageWidth - 100)){
        bg.x -= 2,0;
    }
    if(mouseX >= (stage.stageHeight - 150)){
        bg.x -= 1,5;
    }
    if(mouseX >= (stage.stageWidth - 200)){
        bg.x -= 1,0;
    }
    if(mouseX <= 100){
        bg.x += 2,0;
    }
    if(mouseX <= 150){
        bg.x += 1,5;
    }
    if(mouseX <= 200){
        bg.x += 1,0;
    }
    if(mouseY >= (stage.stageHeight - 100)){
        bg.y -= 2,0;
    }
    if(mouseY >= (stage.stageHeight - 150)){
        bg.y -= 1,5;
    }
    if(mouseY >= (stage.stageHeight - 200)){
        bg.y -= 1,0;
    }
    if(mouseY <= 100){
        bg.y += 2,0;
    }
    if(mouseY <= 150){
        bg.y += 1,5;
    }
    if(mouseY <= 200){
        bg.y += 1,0;
    }
    if(bg.x > bounds.left){
        bg.x = bounds.left;
    }
    if(bg.x <- bg.width + bounds.right){
        bg.x =- bg.width + bounds.right;
    }
    if(bg.y > bounds.top){
        bg.y = bounds.top;
    }
    if(bg.y <- bg.height + bounds.bottom){
        bg.y =- bg.height + bounds.bottom;
    }
}