;

PDA

Click to See Complete Forum and Search --> : [F9] Individual enterframe-events, or not?


Fall_X
07-20-2006, 11:39 AM
Back in the old days when we all did AS2 (just kidding), it used to be faster to have a main loop, which updated all the movieclips (either directly, or by calling mc.update() or something), as opposed to having lots of onEnterFrame methods.
Does this still make sense in AS3? Or is it okay to add enterframe-listeners to multiple objects? I'm not sure how I could find out if there is a speed difference myself, so if anyone knows (or just wants to guess), please let me know.

Thanks!

Edit : off course, in some cases it still makes a lot of sense to loop through your objects and trigger the update from the main loop, especially if you want to have control over when the update happens, but still, I'd like to know if there's a performance difference.

iopred
07-21-2006, 03:39 AM
It's worth a test, but I would think the old method would be the faster method.

Events have always been slow, and I can't see how adding a bunch of listeners to the enterFrame event would be faster.

tonypa
08-08-2006, 07:19 AM
Moved to AS3 forum.