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

  • SEARCH
  • Home
  • 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 922889
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T19:06:16+00:00 2026-05-15T19:06:16+00:00

So I’ve about hundred of map tiles and each title has some object which

  • 0

So I’ve about hundred of map tiles and each title has some object which does some stuff. And one of things it should do is to update text (a time after which you need to do something) in text field. How should i do it better – with enter frame event and on each enter frame update it or set up a timer object which on each second would update the text in text field? I wonder more from performance view which would be better.

  • 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-15T19:06:17+00:00Added an answer on May 15, 2026 at 7:06 pm

    You should use frame events any time you want to do processing that ultimately affects what shows up on the screen. If you’re moving images around, or resizing visual contents, or doing programmatic animations, or anything of that nature, you should use frame events. The reasoning why can get fairly involved, but at the simplest level it boils down to this: if you do that kind of processing more than once between screen updates, you’re wasting performance for no reason, and if you do it less often you get choppy visuals. Using a Timer to do things at the same speed as the frame rate might seem like an alternative, but you’ll spend a certain amount of time out of sync. That is, even if your content is 25FPS and you run a timer with a delay of 40ms, because of small fluctuations in timing, sometimes that timer event will fire twice between redraws, and sometimes it will get skipped. That might be worth it if there was some huge inherent advantage to using Timer, but there isn’t.

    On the other hand, any time you want to do something that happens a lot less often than screen updates, Timer is a good option. It’s clearer to make a timer event that fires in 5 seconds than it is to make a frame listener that counts up to 200. (But be wary of mixing frame events and timers together – see here.)

    Finally a word about performance: it doesn’t make any difference which you use. Or rather, whatever difference there is will be tiny compared to rendering, and what you do inside the frame or timer events. What can make a slight difference is minimizing the overhead – if you do a lot of different things every frame, use a single event listener, and have it call all the functions that need to fire, rather than using lots of listeners. And the same thing goes for Timers. But even this, realistically is unlikely to dent your performance unless you’re running many hundreds of listeners. You should always start out whatever way is simplest, and worry about performance later if testing shows you have a bottleneck.

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

Sidebar

Related Questions

Basically, what I'm trying to create is a page of div tags, each has
I am reading a book about Javascript and jQuery and using one of the
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have just tried to save a simple *.rtf file with some websites and
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small

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.