Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Event listeners for dockable panels

  • Event listeners for dockable panels

    Posted by Chris Orcfilm on September 24, 2019 at 7:19 pm

    So, I have a dockable panel and I need to update a text field in it if the name of the project changes, such as from untitled to a saved filename or if opening a different project or opening a new project (untitled), I want the dockable panel to update the text field.

    Trouble is, I can’t seem to figure out how to trigger the change when these events occur.

    The closest I’ve got is trying to add an event listener but I can’t get it to work.
    For example, I’m trying to use:
    var saveEL = app.project.addEventListener('afterSave', function(theEvent) {
    alert('saved'); //here is where I'll run the update code
    });

    but that throws the error: “Function app.addEventListener is undefined”
    I’ve also tried just app.addEventListener but same error.

    Hoping I’m missing the obvious?

    I’m testing in AE 2018 currently.

    Thank you for reading!

    BC Canada

    Chris Orcfilm replied 6 years, 10 months ago 2 Members · 2 Replies
  • 2 Replies
  • Andrei Popa

    September 25, 2019 at 6:24 am

    I think you need to add the event listener to your text field, not to the app. But I don’t know of a way to make it listen the save of the project.

    Andrei
    My Envato portfolio.

  • Chris Orcfilm

    September 25, 2019 at 5:21 pm

    Thank Andrei, I think you may be thinking of object specific events like onFocus, onChange, etc. I’m referring to Application or Project events. Forgive me if I am misunderstanding but thanks for the thought!

    BC Canada

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