Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Extendscript: Button stays highlighted after click

  • Extendscript: Button stays highlighted after click

    Posted by Jay Brown on May 29, 2016 at 5:28 pm

    Is their a way to deselect a button after its been clicked?

    currently I have:
    myPanel.grp.groupOne.myPurgeButton.onClick = function () {
    var newPurgeButton = app.purge(PurgeTarget.IMAGE_CACHES);
    }

    The only thing I can find is that if I add
    myPanel.grp.groupOne.myPurgeButton.active = false;
    it seems to work on the first click, but not on any consecutive clicks.

    Any ideas on how to do this?

    Thanks,
    -Jay

    Konstantin Nemo replied 7 years ago 2 Members · 1 Reply
  • 1 Reply
  • Konstantin Nemo

    April 20, 2019 at 7:27 am

    I had the same issue in the latest AE version (16.1.1). I googled it, but failed to find an answer.

    Fortunately, I found a simple workaround for this issue. You just need to explicitly make an element active, then make it inactive back. In your case it might look like:

    myPanel.grp.groupOne.myPurgeButton.active = true;
    myPanel.grp.groupOne.myPurgeButton.active = false;

    It might be useful for those, who stumbled across the same problem.

    All the Best,
    Konstantin Nemo
    Music Visualizer Templates

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy