You can probably create your own class that will automatically add every
event and route them accordingly, but it might end up being more work than
it's worth, or less efficient than you'd like.

There's no all-event approach to stopping propagation because only a single
event is stopped. That is, if you have a mouse down, followed by a mouse up,
stopping propagation after mouse down will not prevent the mouse up from
executing.

Regarding your dispatching question, you can dispatch from any class that
ultimately extends EventDispatcher. So, you can dispatch from a document
class, for example. I'm not sure what you mean by having an instance of the
dispatching object and adding a listener to the same object. You can
dispatch from one instance and listen from another.


On 7/3/08 3:23 AM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:

> Considering that all events commence with the capture phase (stage to
> target), is there anyway to have just one stage listener for all events (of
> any type) that kills off event propagation, then routes said event to
> perhaps an event manager or function that determines the event type and what
> operation is required?
> 
> If possible, would this be ideal when you know your application only has
> 10-15 events (either user or system generated) to account for?
> 
> I still don't completely understand the AS3 event framework and it doesn't
> seem to make sense to me to have 10 or 15 listeners located throughout an
> application. Not to mention the fact that, as far as I'm aware, within any
> class from which you want to listen for an event, you need to have a
> instance of the dispatching object, then add the listener to the same
> object?

Rich
http://www.LearningActionScript3.com


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

Reply via email to