MouseListener/Order Question for Gallery

Hey! So I have a multi-gallery picture viewer that also has thumbnails. I’m trying to implement a scroll bar for viewing the different albums. Posted here are two sections of code, when the second is above the first, the scroll bar doesn’t work but the pictures load. And when then the second is below the first, the pictures don’t load, and the scroll bar works!

first code



onEnterFrame = function () {
 (this.menu_mc.thumb_menu.destX-this.menu_mc.thumb_menu._x)/3;
    hover.txt._width = hover.txt.textWidth+10;
    hover.bg._width = hover.txt._width+10;
    loaded = holder.getBytesLoaded();
    filesize = holder.getBytesTotal();
    if (filesize>100) {
      (preloader stuff)
            if (bg_mc.bg._width>destWidth) {
                info_mc._alpha += (info_mc.destAlpha-info_mc._alpha)/5;
                if (holder._alpha<100) {
                    holder._alpha += 5;
                }
            } else {
                info_mc._alpha = 0;
                info_mc._destAlpha = 0;
            }
        }
    }

};


onEnterFrame = function () {
    scrollRatio = albumScroll._height/scrollBar._height;
    ratio = (albumScroll._height+5-scrollBar._height)/(scrollBar._height-scrollBttn._height);
    if (albumScroll._height+5>scrollBar._height) {
        destScroll = ((-scrollBttn._y+albumScroll.originY)*ratio)+albumScroll.originY;
        albumScroll._y += Math.round((destScroll-albumScroll._y)/scrollTween);
    }

}


I’m not sure what is causing this conflict… I’ve been moving stuff around for an hour and can’t seem to see what the error is. Anyone have a clue?