Copy link to clipboard
Copied
I found out this weekend in the CC Javascript Tool Guide that various little things were removed from extendscript, for example I was using addEventListener('click', ... on some buttons and 'click' doesn't seem to be available anymore.
It would really help if instead of being removed straight away things were flagged as deprecated first, and if the Extendscript Toolkit could warn us about deprecated stuff. Are there any plans to enhance the toolkit a bit? It's very useful and well integrated in the suite but a bit too minimalistic.
Copy link to clipboard
Copied
It appears to still be listed in the document maxweel. Pg. 119
Copy link to clipboard
Copied
Thanks David, I'm not sure how I managed to miss that!
And yet it doesn't seem to work in AE CC. Could anyone save this as a jsx and place it in the Scripts Panel folder to give it a try? Normally all controls should trigger the action but in my case only 'mousedown' works in CC.
function Test(dlg)
{
var btnCallback = function (e) { alert(e); };
dlg.btnPnl = dlg.add('panel', [0, 0, 100, 110], 'Click us');
dlg.btnPnl.btn1 = dlg.btnPnl.add('button', [10, 10, 90, 30], 'click');
dlg.btnPnl.btn1.addEventListener( 'click',
btnCallback,
false);
dlg.btnPnl.btn2 = dlg.btnPnl.add('button', [10, 40, 90, 60], 'mouseup');
dlg.btnPnl.btn2.addEventListener( 'mouseup',
btnCallback,
false);
dlg.btnPnl.btn2 = dlg.btnPnl.add('button', [10, 70, 90, 90], 'mousedown');
dlg.btnPnl.btn2.addEventListener( 'mousedown',
btnCallback,
false);
}
Test(this);
I'm sure that this worked in CS6, am I doing something silly?
Copy link to clipboard
Copied
Trying it now.
Copy link to clipboard
Copied
It launches fine for me in AE CC, OS X 10.8.2. I get feedback only on the mousedown button, not the other two.
Also your code above assigns button 2 twice, so I changed the third one to 3 on my end.
Copy link to clipboard
Copied
Thanks David, you're right, btn2 is overwritten but that shouldn't affect the behaviour of the window.
I tried it in CS6 again and the three buttons trigger the function as expected, I guess I should report the bug now.
Copy link to clipboard
Copied
Right now is May of 2017...
I recently meet the same "mouseup" problem while I using onDraw function.
Can Anyone give me suggestion that I can solve this problem?
I tried this
Its work fine, but I don't like the button border, especially I have no way to get rid of it in 2017 floating window.