3 Replies Latest reply on May 8, 2009 2:20 PM by brian914

    One Listener for multiple things?

    brian914 Level 1

      Is is OK to use on listener for multiple events on the same object?

      I have this for a FLV component and it seems to work. Is that legit?


      var listenerObject:Object = new Object();

      listenerObject.complete = function(eventObject:Object):Void {

          trace("End of this video!!!!");


      myVideo.addEventListener("complete", listenerObject);


      listenerObject.stateChange = function(eventObject:Object):Void {

          trace("stateChange just occurd!!!");


      myVideo.addEventListener("stateChange", listenerObject);



      Thanks a lot for any info!!!