Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions AddEventListener goofy behavior

  • AddEventListener goofy behavior

    Posted by Robert Womack on January 2, 2013 at 4:54 pm

    I’m attempting to port Rob’s Timecode Calculator to work as a dockable Script UI window, but I’m having trouble getting the addEventListener to work properly. Just creating a simple window with a static text field to show the keyName, and the plus and asterisk keys register as undefined, regardless if I am using the keyName or keyIdentifier property. Here’s the code:


    var win = (this instanceof Panel) ? this : new Window("palette", "Test", undefined, {resizeable: true});
    this.windowRef = win;

    var txt = win.add("statictext", undefined, "00:00:00;00");
    win.addEventListener("keydown", function(k){ txt.text = k.keyName });

    win.show();

    It works in ESTK, but has no effect in AE CS6 (Mac). Barring getting the adEventListener functionality working in AE, it seems odd that Adobe’s version of Javascript can’t recognize the ASCII codes being passed by the keyboard.

    I’m assuming that it’s an Operator Error (ID 10T), and any help would be greatly appreciated.

    Robert Womack replied 13 years, 4 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

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