RE: [Flashcoders] one class listening for another classes dispatched event

2009-11-17 Thread Merrill, Jason
Hi Michael, When you do b.addEventListener - you're listening for events in b, not in c. You should not, architecturally speaking, have b listen to c at all - that's called tight coupling, which is bad. You should instead do loose coupling, which would have your singleton class a listen for

RE: [Flashcoders] one class listening for another classes dispatched event

2009-11-17 Thread Mendelsohn, Michael
Thanks Jason. I wasn't sure if a listening for c and calling a function in b as a result qualifies as tight coupling also between the three classes. In any case, that was the other plan I had intended on going with. Thanks for the great answer! - MM

Re: [Flashcoders] one class listening for another classes dispatched event

2009-11-17 Thread Henrik Andersson
Merrill, Jason wrote: Hi Michael, When you do b.addEventListener - you're listening for events in b, not in c. You should not, architecturally speaking, have b listen to c at all - that's called tight coupling, which is bad. So better to do the loose coupling thing I outlined above. Tight