Gallery livebox flash

Hi
I have a problem with my gallery. I want disable my button mc ( thumbnail_mc) when is loaded picture to _root.picture.lapacz , but I dont now why. How want to help me? Please


function loadXML(loaded) {
    if (loaded) {
        xmlNode = this.firstChild;
        image = [];
        description = [];
        thumbnails = [];
        _global.total = xmlNode.childNodes.length;
        for (i=0; i<total; i++) {
            image* = xmlNode.childNodes*.childNodes[0].firstChild.nodeValue;
            description* = xmlNode.childNodes*.childNodes[1].firstChild.nodeValue;
            thumbnails* = xmlNode.childNodes*.childNodes[2].firstChild.nodeValue;
            thumbnailer(i);
        }
        firstImage();
    } else {
        trace("file not loaded!");
    }
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad =loadXML;
xmlData.load("images.xml");



p = 0;
this.onEnterFrame = function() {
    filesize = _root.picture.lapacz.getBytesTotal();
    loaded = _root.picture.lapacz.getBytesLoaded();
    _root.picture.preloader._visible = true;
    if (loaded != filesize) {
        _root.picture.preloader.preload_bar._xscale = 100*loaded/filesize;
    } else {
        _root.picture.preloader._visible = false;
        if (_root.picture.lapacz._alpha < 100) {
            _root.picture.lapacz._alpha += 10;
        }
    }
};



function callImage() {
    if (loaded == filesize) {
        _root.picture.lapacz._alpha = 0;
        _root.picture.lapacz.loadMovie(image[p],1);
        cdesc_txt.text = description[p];
        _root.picture.desc_txt.text = this.cdesc_txt.text;
// tu zmieni&#322;em akcje
    }
}
_root.picture.wywalanie.onPress = function() {
    unloadMovie(_root.picture.lapacz);
    _root.picture._visible = false;
    _root.picture.desc_txt.text = "";
    fixText(str);
    grid_maker_01();
};


function thumbnailer(k){
    loaded_counter = 0;
    total_thumbs = _global.total;
    _root.picture.total_thumbs.text=_global.total;
        var container = thumbnail_mc.createEmptyMovieClip("th"+k,thumbnail_mc.getNextHighestDepth());
    container._visible=false;
    container._alpha=0;
    var image = container.createEmptyMovieClip("img", container.getNextHighestDepth());
        tlistener = new Object();
    tlistener.onLoadInit = function(target_mc) {
        target_mc.pictureValue = k;
        target_mc.onRelease = function() {
            p = this.pictureValue;
            callImage();
            genText(_root.picture.desc_txt.text);
            _root.picture._visible = true;
        };
        target_mc.onRollOver = function() {
            this._alpha = 50;
        };
        target_mc.onRollOut = function() {
            this._alpha = 100;
        };
            loaded_counter++;
        _root.picture.counting_txt.text = loaded_counter;
        if (loaded_counter == total_thumbs) {
            grid_maker_01();
    }
        };
    image_mcl = new MovieClipLoader();
    image_mcl.addListener(tlistener);
    image_mcl.loadClip(thumbnails[k],"thumbnail_mc.th"+k+".img");
}
function genText(str) {
    len = str.length;
    counter = this.cdesc_txt.text.length;

    _root.picture.desc_txt.text = "";
    tracker = 0;
    fixer = 0;
    randomizer = setInterval(reduceText, 5, counter);
    
    function reduceText(total) {
        soundPlay();
        //trace(counter);
        if (counter<0 || _root.picture._visible==false) {                    
            clearInterval(randomizer);
            soundStop();
            fixText(str);
        } else {
            _root.picture.desc_txt.text = "";
            if (tracker>=total-str.length){
                fixer++;
                for (i=0; i<fixer; i++) {
                    _root.picture.desc_txt.text += str.charAt(i);
                }
        }
            for (i=0; i<(total-tracker); i++) {
                randomNum = Math.random()*30+90;                                                 
                _root.picture.desc_txt.text += String.fromCharCode(randomNum);
            }
            counter--;
            tracker++;
        }
    }
    
}

function fixText( str ) {
    
    _root.picture.desc_txt.text = "";
    soundStop();
    for (i=0; i<str.length; i++) {
        _root.picture.desc_txt.text += str.charAt(i);
    }
    
}



MovieClip.prototype.grid_maker_01=function(f){
    num=0;
    col = 2;
    row = _global.total/2;
    scale = 100;
    space = 15;
    area = 40;
    
    for (l=0;l<col;l++){
        for (j=0;j<row;j++){
            if (num<_global.total) {
                with(eval("this.thumbnail_mc.th"+num)){
                    _x=((_width+space)*scale/100)*l;
                    _y=((_height+space)*scale/100)*j;
                    _xscale=_yscale=scale;
                    _visible=true;
                }
                num++;
            }
        }
    }
    this.cascader();
            };



MovieClip.prototype.cascader=function(){
    inter = 30;
    c = 0;
    delayed_fade=function(){
        if (c<_global.total){
            with(eval("this.thumbnail_mc.th"+c)){
                fadein();
            }
            c++;
        }else{
            clearInterval(delay);
        }
    }
    delay=setInterval(delayed_fade,inter);
        };



MovieClip.prototype.fadein=function(){
    this.onEnterFrame=function(){
        if (this._alpha<100){        
            this._alpha=this._alpha+5;
        }else{
            this._alpha=100;
            delete this.onEnterFrame;
        }
}
}
stop();