Actually, I'm trying to avoid each DisplayObject tracing its way back
to the root (which, at any given time, it may not be able to do
depending on where it is in the DisplayList, on or off the stage, etc.).
Here's a more succinct way to ask my question:
Given that the display list is a classic tr
abstraction you want.
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of thirtyfivemph
Sent: Thursday, February 14, 2008 8:17 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Broadcasting event to all objects on display
list
Actually, I
> If each node must be responsible for the dispatch to its children, then yes,
> you're probably doing it the right way. It'll chew up some cycles, but all
> tree walks effectively do. The only way to "optimize" is to flatten the
> tree at some point which breaks the abstraction you want.
Cool.
Behalf Of thirtyfivemph
Sent: Thursday, February 14, 2008 8:17 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: Broadcasting event to all objects on display
list
Actually, I'm trying to avoid each DisplayObject tracing its way back
to the root (which, at any given time, it may not be
> It would be unnatural to try to use the event mechanism to propogate an
> event to all descendants of a tree node. Use a recursive method call to
> accomplish this.
So, you're thinking something like this (pseudo-code):
for (var i:int = 0; i < this.numChildren; i++)
{
var child:IPropogatabl
oders@yahoogroups.com
Subject: Re: [flexcoders] Re: Broadcasting event to all objects on
display list
> It would be unnatural to try to use the event mechanism to propogate
an
> event to all descendants of a tree node. Use a recursive method call
to
> accomplish this.
So, you're thinking
6 matches
Mail list logo