Disable the button and enable them after slide visited and assign them advance action
I am trying to build the custom table of content. In the table of the content slide, I have seven buttons, by clicking each of them it jumps to the first slide of its chapter. which means seven buttons for seven different chapters and each chapter has several slides.
Screenshot here:

I have a variable var_lastSlide to track the slide. e.g after entering the second chapter, I have assigned value 1_2 to the var_lastSlide variable.
Here is the screenshot:

Each slide has a button for jumping to the table of content slide. Here also, I have assigned an advance action GoToMenuSlide. In this action, I store the value of cpInfoCurrentFrame in var_startFrame variable.
Here is the screenshot of the advance action:

Each button in the table of content has assigned advance action for e.g for the second chapter button, it would be jump_to_1_2. Here what I have checked is if the lastSlide has the value of 1_2, I assign cpCmndGotoFrameAndResume with var_startFrame, to resume where it was left off (in case if I am in chapter two and I go to the table of content and again I click chapter second button, I need to resume from where it was left), that is why I stored cpInfoCurrentFrame value in var_startFrame in GoToMenuSlide action.
Screenshot -: (if I came to table content after visiting chapter-two: 1_2)

If lastSlide is not 1_2 then the slide will jump to the first slide in chapter two, starting initially.
Screenshot:

And this is working properly.
What I am trying to achieve is, initially disable all the buttons except first. I want to not let the users go to another chapter without completing the preceding chapter. for e.g I want the button for the second chapter to enable only when in the last slide of the first chapter is completed (it maybe includes some interaction e.g enable that second button only when all the buttons are clicked in this slide or after just visiting this slide).
I can disable the second button initially, enable the second button when all of the buttons clicked in the last slide of the first chapter (with advance action) but can not assign the advance action jump_to_1_2, without which, the second button will not be functional.
Is it possible to enable a button and assign it an advanced action from other advanced actions?
has anybody had a similar issue?
Thank you.
