A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: [F9] Individual enterframe-events, or not?

  1. #1
    crossconscious
    Join Date
    Sep 2005
    Location
    Belgium
    Posts
    1,188

    [F9] Individual enterframe-events, or not?

    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.
    Last edited by Fall_X; 07-20-2006 at 11:13 AM.

  2. #2
    Heli Attack! iopred's Avatar
    Join Date
    Jun 2003
    Location
    Sydney, Australia
    Posts
    923
    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.
    Christopher Rhodes
    squarecircleco.

  3. #3
    Senior Member tonypa's Avatar
    Join Date
    Jul 2001
    Location
    Estonia
    Posts
    8,223
    Moved to AS3 forum.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center