FORUMS: list search recent posts

ExtendScript - Shift Click addEventListener

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
James Ronan
ExtendScript - Shift Click addEventListener
on Jun 9, 2016 at 7:58:46 pm

Hey guys

Been trying to add a shift click event to my button, I've found a few bits of info on the web but when I apply them to my script it doesn't work...

Within my dockable panel, this is what I've got so far:

var myButtonCtrl = myPanel.grp.groupOne.mySolidPanel.myButton;

myButtonCtrl.addEventListener ("click", function (k) {
if (k.shiftKey) {
alert("One");
}else{
alert("Two");
}
});


Is there anything I'm doing wrong? If I do an .onClick it works perfectly.

Thanks!


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]