Did you find out if this is possible? I've patched FlexSprite with a remove
event listener method but I think that it is causing an issue where my
project (web) doesn't load on any computer except my own. But the reason
it's not loading might be an issue with monkey patching but I haven't found
the cause yet.

Also, you can use,

nLoopingIndex = [1,2,3].length;

for ( ; nLoopingIndex-- ; ) {
    trace(nLoopingIndex);
}

to reverse through a loop when you know the index will always be 0 or
greater.


On Tue, Jul 16, 2013 at 8:16 PM, Mark Kessler
<kesslerconsult...@gmail.com>wrote:

> Changing the flexsprite wasn't going to get everything.  It was just low
> hanging fruit for a test/example since it allowed me a wide range of
> components to test with.  If I could have changed the EventDispatcher it
> would have been a better :P
>
> I like the looping backwards idea for removing items... will keep me from
> adjusting values as much.  I'll change over to that later.
>
> I started using more getItemAt because not everything allows the brackets
> anymore.  Not sure how much of a speed difference there is.
>
>
> Thanks Justin
>
> -Mark
>
> On Tue, Jul 16, 2013 at 8:41 PM, Justin Mclean <jus...@classsoftware.com
> >wrote:
>
> > Hi,
> >
> > >
> >
> https://github.com/KesslerConsulting/example/commit/30ee4b96911d301ea09516324241c4bc9d734f16
> >
> > Very quick glance, but I think that removing items from a list when
> you're
> > looping to the number of original items in the list can get you into
> > trouble.
> >  for (nLoopingIndex = 0; nLoopingIndex < nListenerTotal; nLoopingIndex++)
> >
> > It's best to loop backwards to avoid this issue. Like so:
> >  for (nLoopingIndex = nListenerTotal -1 ; nLoopingIndex >= 0;
> > nLoopingIndex--)
> >
> > I'd also use bracket notation rather than getItemAt but perhaps that's
> > just me?
> >
> > You might also need to think about stage events and the like.
> >
> > Thanks,
> > Justin
>

Reply via email to