addEventListener doesnt worjk anymore in AE CC??

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
bkan
Posts: 51
Joined: November 6th, 2013, 8:33 am

Hello,
I have migrated my own script from CS6 to CC, and all scripts work, except those with an "addEventListener" function.
Here is my code (after building th UI, which works well) :

myPanel.grp.myTabbedPanel.myTab1.myTabContent1.addEventListener('click', multiWiggle);

function multiWiggle(ev){

var b = ev.target;
var modState = ScriptUI.environment.keyboardState;

if (!(b instanceof Button)) {
return;
}

if (modState.shiftKey){
wiggleController_fonction();
}

else{
wiggleSimple_fonction();
}
};

Even if I write an alert in the "function multiWiggle" function, after effects doesn't pop up any message, so I think it's the addEventListener which doesn't work : any idea?

Thanks in advance,

(sorry for my english!)
chriskelley
Posts: 4
Joined: August 1st, 2012, 5:22 pm

Hi bkan -

You might find this discussion at the Adobe scripting forum useful:
https://forums.adobe.com/thread/1251722

Click events specifically are having problems with eventListeners, dig through that thread and see if any of the answers apply to your case.

Good luck!
Chris
Post Reply