If (_root._currentframe != 6){ is not working! (stomps foot like little kid)

Hi folks,
In my artist’s mind, this code should work, but doesn’t. Am I missing something? I’m simply trying to disable the button “cardSearchBtn” when the root timeline enters frame 6 (along with two other play actions).


if (_root._currentframe != 6){
    cardSearchBtn.enabled = true;
    cardSearchBtn.onRelease = cardSearchBtn.onReleaseOutside = function(){
        _root.searchPanelMC.play();
        _root.play();
    }
}else{
    cardSearchBtn.enabled = false;
}

Thanks.