Re: [Flashcoders] bubbling listening

2010-03-19 Thread Jim Lafser
Behalf Of Merrill, Jason Sent: Thursday, March 18, 2010 9:51 AM To: Flash Coders List Subject: RE: [Flashcoders] bubbling listening Well, that's OK and you don't even have to get fancy yet - just write a class that has references to all the display objects, and listens to your cust

RE: [Flashcoders] bubbling listening

2010-03-19 Thread Cor
Merrill, Jason Sent: donderdag 18 maart 2010 15:51 To: Flash Coders List Subject: RE: [Flashcoders] bubbling listening Well, that's OK and you don't even have to get fancy yet - just write a class that has references to all the display objects, and listens to your custom events. It al

RE: [Flashcoders] bubbling listening

2010-03-18 Thread Mattheis, Erik (MIN - WSW)
: [Flashcoders] bubbling listening The view would have public methods the controller calls. The views retain their encapsulation/loose coupling as does the model. The controller however, is tied into calling specific methods on views - so it's tightly coupled. There are patterns to break

RE: [Flashcoders] bubbling listening

2010-03-18 Thread Merrill, Jason
leaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Mattheis, Erik (MIN - WSW) Sent: Thursday, March 18, 2010 5:43 PM To: Flash Coders List Subject: RE: [Flashcoders] bubbling listening I've been thinking about the below message from Jason and tried rearranging a sim

RE: [Flashcoders] bubbling listening

2010-03-18 Thread Mattheis, Erik (MIN - WSW)
o: Flash Coders List Subject: RE: [Flashcoders] bubbling listening Well, that's OK and you don't even have to get fancy yet - just write a class that has references to all the display objects, and listens to your custom events. It also has the handlers in it to respond to the events. Th

RE: [Flashcoders] bubbling listening

2010-03-18 Thread Merrill, Jason
..@chattyfig.figleaf.com [mailto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Mendelsohn, Michael Sent: Thursday, March 18, 2010 10:47 AM To: Flash Coders List Subject: RE: [Flashcoders] bubbling listening Yes, I suspected I've been touching on MVC. I'm not that sophisticated in my design pa

RE: [Flashcoders] bubbling listening

2010-03-18 Thread Mendelsohn, Michael
Yes, I suspected I've been touching on MVC. I'm not that sophisticated in my design pattern usage yet. I will get there though. Thanks for the follow up responses Jason. I really appreciate the feedback. - Michael M. >> In my project, this EventDispatcher managing all the Sprites. Is the

RE: [Flashcoders] bubbling listening

2010-03-18 Thread Merrill, Jason
ubject: RE: [Flashcoders] bubbling listening Thanks for the responses everyone! > Yes, and what I am saying is, that architecture is wrong. You don't create instances of EventDispatcher and then put Display object inside of them. OK, it seems I've violated a golden rule about bubbli

RE: [Flashcoders] bubbling listening

2010-03-18 Thread Mendelsohn, Michael
Thanks for the responses everyone! > Yes, and what I am saying is, that architecture is wrong. You don't create > instances of EventDispatcher and then put Display object inside of them. OK, it seems I've violated a golden rule about bubbling. My EventDispatcher obviously isn't on the display

RE: [Flashcoders] bubbling listening

2010-03-17 Thread Barry Hannah
lto:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Steve Mathews Sent: Thursday, 18 March 2010 2:08 p.m. To: Flash Coders List Subject: Re: [Flashcoders] bubbling listening Might be obvious, but bubbling only works on the display list. So if your classes aren't all on the display list, then it w

RE: [Flashcoders] bubbling listening

2010-03-17 Thread Merrill, Jason
to:flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Mendelsohn, Michael Sent: Wednesday, March 17, 2010 2:39 PM To: Flash Coders List Subject: RE: [Flashcoders] bubbling listening Hi Jason, thanks for responding! > Make sense? most. :-) > What do you mean "The EventDispatcher conta

Re: [Flashcoders] bubbling listening

2010-03-17 Thread Steve Mathews
Might be obvious, but bubbling only works on the display list. So if your classes aren't all on the display list, then it won't work. Steve On Wed, Mar 17, 2010 at 11:39 AM, Mendelsohn, Michael < michael.mendels...@fmglobal.com> wrote: > Hi Jason, thanks for responding! > > > Make sense? > Almos

Re: [Flashcoders] bubbling listening

2010-03-17 Thread Jer Brand
(feel free to shoot me if this is a bad idea) Cheat. Assuming EventDispatcher is a custom class and you're using AS3, create a method within EventDispatcher to add Singleton as an event listener to CustomSprite. Something like public function myAddCustomSpriteListener(eventName:String, listener:

RE: [Flashcoders] bubbling listening

2010-03-17 Thread Mendelsohn, Michael
Hi Jason, thanks for responding! > Make sense? Almost. :-) > What do you mean "The EventDispatcher contains an instance of a sprite." The EventDispatcher has a private var that's a reference to a custom class that extends Sprite. The Event Dispatcher is instanced in the singleton, it's not on

RE: [Flashcoders] bubbling listening

2010-03-17 Thread Merrill, Jason
1:38 PM To: Flash Coders List Subject: [Flashcoders] bubbling listening Hi list... I have a singleton that contains an instance of an EventDispatcher. The EventDispatcher contains an instance of a sprite. I want that sprite to dispatch a custom event that is listened to by the singleton, but I can&#

[Flashcoders] bubbling listening

2010-03-17 Thread Mendelsohn, Michael
Hi list... I have a singleton that contains an instance of an EventDispatcher. The EventDispatcher contains an instance of a sprite. I want that sprite to dispatch a custom event that is listened to by the singleton, but I can't seem to make it happen, even by saying bubbles = true. I could h