If this is an example of the listener object approach:

----------------------------------------------------------------------------------------
myObj = new Object();
myObj.onMouseDown = myFunction;
function myFunction() {
        trace("tracing something");
}
Mouse.addListener(myObj);
----------------------------------------------------------------------------------------

... and the listener object approach is favored over the event handler function approach, what would the above code look like if it were written with the event handler function approach.

Where you can use one approach, can you always use the other ? (trying to understand the difference and where to use one instead of the other).

Apparently, the main reason the listener object approach is favored is because multiple listener objects can receive events from the same component/movieclip/etc. Does anyone have an example of this so I can see the advantage in action.

Thanks in advance for any assist,
Stephen.


_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to