Hi:
I don't recall seeing an answer to this. If I missed it, please let me
know. See below:
Message: 4
Date: Sun, 15 Jan 2006 00:38:01 +0000
From: "Stephen Ford" <[EMAIL PROTECTED]>
Subject: [Flashcoders] Listener objects vs event handler functions ...
To: [email protected]
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; format=flowed
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
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders