Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 527921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:56:01+00:00 2026-05-13T08:56:01+00:00

If I have added Event.ENTER_FRAME listeners to different components, how can I set or

  • 0

If I have added Event.ENTER_FRAME listeners to different components, how can I set or know the ordering of when these events will be fired on each enterFrame?

Instead of adding enterFrame listeners to individual elements, is it better practice to have one element which listens for enterFrame events, and has an array of elements needing updating on enterFrames, thereby making it easy to organize and change the firing order of these events?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T08:56:01+00:00Added an answer on May 13, 2026 at 8:56 am

    You can prioritize event listeners, thereby ordering the execution of them. Use the fourth property of addEventListener(), an integer that indicates priority. Event listeners added with a high priority integers will be executed before those with lower priority. See the addEventListener() reference for more information.

    But you are also right that it is usually a better idea to create your own update manager. This is because event listeners require an Event (or sub-class thereof) to be instantiated, which can greatly affect performance (instantiation is one of the most heavy tasks in the Flash runtime.) This is especially unfortunate with ENTER_FRAME events, as you will often not use the event object anyway.

    Create a manager class, from which other parts of your application may subscribe to update callbacks. Whenever a callback is registered, add one ENTER_FRAME (or TimerEvent.TIMER) event listener inside the manager class that invokes all callbacks. When the last callback is removed, remove the event listener as well.

    While on the topic of events and performance, you might be interested to know that for events that bubble (most interaction events that take place in the display list), a new event object is created for each dispatcher that the event passes during the bubbling! It’s always a good idea to remove event listeners whenever you don’t need them.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have aa question re:AS 3. I made a Post-It note movie clip that
i will try to be clear.. here i am working on a datagrid. in
I have 2 RichTextBox es (rtb1, rtb2), I something wrote in rtb1 and click
I have a cell editor that contains a little button and then a textfield
I have a form where user enters data about a new inventory item (id,title,
I have a delegate to create a QLineEdit control when you want to edit
I'm doing a project where i need some custom swing components. So far I
when launching the following code in ADL, why does the square continue to rotate?
This is what I want to happen.. When a user hits 'enter' a 'SearchForItems()'
I need to create a non modal Silverlight 4.0 control that would appear (pop

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.