3 Replies Latest reply on Oct 26, 2006 8:29 AM by kglad

    addListener() vs. addEventListener()

    DZ-015 Level 1
      I'm going through a set of tutorials, and where in the past I have used addListener to specify an object as an event listener, a new tutorial is asking me to use addEventListener().

      The differrence is that addListener() requires only one parameter - the object that will be the listener. addEventListener also requires a string which is the name of the event that will be triggered. When I am listening for multiple events, this would necessitate multiple listeners - a big pain.

      So - here's my question. Is there any application where addListener() just won't work, so I should deffinately use addEventListener()? Also, since addEventListener() is both more limited in function and more code intensive, is there any advantage it has over addListener()?