AS3 Animated Movieclip Events

Oct 28 '12

Comments: 1

AS3 Animated Movieclip Events

Wow, it has been a busy couple months we just hit Beta at Stoic. With a little time thought I would take some time to write about AS3 animated movieclip events. There is 3 different kind of events you can listen to: ENTER_FRAME, FRAME_CONSTRUCTED, and EXIT_FRAME.

So here is what is happening between these events:
  1. Event of event type Event.ENTER_FRAME dispatched
  2. Constructor code of children MovieClips is executed
  3. Event of event type Event.FRAME_CONSTRUCTED dispatched
  4. MovieClip frame actions are executed
  5. Frame actions of children MovieClips are executed
  6. Event of event type Event.EXIT_FRAME dispatched
I currently have not found a good situation to use enter_frame. It's a common mistake don't use it at all for finding children at certain frames, in most cases the child doesn't even exist yet. For The Banner Saga UI work I have been using exit_frame to grab children and stop children from playing. This has been working really well for us, and haven't had any problems with it so far. On another note, about when testing your movieclips make sure to test it under low frame rate scenarios. I have found frames can get skipped and completely passes my events happening on certain frames, so I strongly suggest reducing events happening on specific frames.

Related Posts

Comments (1)
  1. ripub3

    September 7, 2014 at 7:06 am

    Dear Anonymous – how is it that Brandon deserves mincokg, yet Fodder and Daniel make aceptable comments? Let me try to articulate Brandon’s point in a way thayt is less offensive to your delicate, yet sophisticated demeanor.Please continue believing that all Montanans are backward, ingrates and we have yet to adopt indoor plumbing. That way I can continue to spend my days without the all the benefits, conveniences and pleasant fellow humans you (according to the Twitter heatmap) evolved and civilized people in LA, Chicago and New York get. Better? Have a great day.

Leave a comment

Your email address will not be shared or published. Required fields are marked *