3 Replies Latest reply on Mar 6, 2015 7:36 AM by Rob_ge

    Can eventlisteners be added to buttons?

    Rob_ge

      Not sure if I'm doing it wrong or if it's just not possible. With the snippet below I get "Error Number: 24" "Error String: myButton.addeventlistener is not a function"/

      Thanks in advance!

       

      var buttons = app.documents.item(0).buttons;

      for(var i = 0; i<buttons.length; i++){

        var myButton = buttons[i].name;

        myButton.addEventListener("mouseup", myListener);

      }