ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Event listeners for dockable panels

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Chris Orcfilm
Event listeners for dockable panels
on Sep 24, 2019 at 7:19:04 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

Return to posts index

Andrei Popa
Re: Event listeners for dockable panels
on Sep 25, 2019 at 6:24:05 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.

My Envato portfolio.

Return to posts index

Chris Orcfilm
Re: Event listeners for dockable panels
on Sep 25, 2019 at 5:21:49 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

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2019 All Rights Reserved