----- Original Message ----- From: Alex Harui To: flexcoders@yahoogroups.com Sent: Tuesday, March 25, 2008 6:49 PM Subject: RE: [flexcoders] Can a Listener return a value
That works, but is considered a "hack" in the strictest sense. The W3C Events spec indicates that event properties are read-only. Flash allows writing to them to make setup easier (constructor args are easy to mix up). Hmm. In this sense, surely event.target is a reference to an object, so really this has nothing to do with event properties at all? (it's just using the object reference to set a public attribute). Or are you referring to the lack of a cast - SomeClass(event.target).publicParameter ? Of course the listener could also call a callback method - SomeClass(event.target).aCallbackFn() . Paul ------------------------------------------------------------------------------ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike Krotscheck Sent: Tuesday, March 25, 2008 11:34 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Can a Listener return a value foo.addEventListener( Event.SomeEvent, responderEventHandler ); private function responderEventHandler(event:Event):void { event.target.publicParameter = "bar"; } Michael Krotscheck Senior Developer RESOURCE INTERACTIVE www.resource.com [EMAIL PROTECTED] _______________________________________________________________________________ We support privacy and confidentiality. Please delete this email if it was received in error. What's new :: Capitalize on the social web | The Open Brand, a new book by Kelly Mooney and Dr. Nita Rollins, available March 2008 | www.theopenbrand.com ------------------------------------------------------------------------------ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of markgoldin_2000 Sent: Tuesday, March 25, 2008 1:31 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Can a Listener return a value Can a Listener program return a value back to a program that set this listener up? Thanks