Xml Button_mc how to "stay active"?

Hi Kirupians…!:slight_smile:

I hope some can help me out / or give me an actionscript example on how to ad a “stay active” aka “pressed state” of a dynamic gerenerated xml butten,

I’ve got my xml menu up and running evereything is working fine, I only need this feature to make my menu complete…

here is mij actionscript concerning the “button” functions:

ActionScript Code:
[FONT=Courier New][LEFT]_root.treemenu["button"+vz+"_" + i].onRollOver = function(){
        showhide(this,"show");
        this.gotoAndPlay("on");        
        this.background.gotoAndPlay("on");                    
    }        
    
    _root.treemenu["button"+vz+"_" + i].onRollOut = function(){
        showhide(this,"hide");
        this.gotoAndPlay("off");                    
        this.background.gotoAndPlay("off");                            
    }                
    
    _root.treemenu["button"+vz+"_" + i].onRelease = function(){

        treeloadmovie(this.swf);
    }
    
    if(diepte > 0){
            _root.treemenu["button"+vz+"_" + i]._visible = false;
    }
    
    _root.treemenu["button"+vz+"_" + i]._x = xpos;
    _root.treemenu["button"+vz+"_" + i]._y = ypos;

// xpos += root.treemenu[“button”+vz+"" + i].label._width;

    if(item.childNodes.length > 0){
            var thisparent = Array();
            for(var j=0;j<parent.length;j++){
                thisparent.push(parent[j]);            
            }                
            thisparent.push(i);
            createMenu(item,mc.menu["button_"+i],diepte+1,thisparent);
    }
    

    
}

}

[/LEFT]
[/FONT]

If my code is not clear enough, a stic example is also fine…

Many thanks

best

Arn