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 7428909
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T08:53:07+00:00 2026-05-29T08:53:07+00:00

Before anything else, this is the offending bit of code: for (var i in

  • 0

Before anything else, this is the offending bit of code:

for (var i in yearMarkersArray) {
 yearMarkersArray[i].x = ((timelines.x + 350) % 140) + (140 * i) - 5;
 yearMarkersArray[i].text = "0";
}

This is part of the main loop that triggers whenever the user drags the zoomed-out timelines (the sprites in eventsArray) left or right. The six TLFText objects in yearMarkersArray appear to scroll left or right with the user, but are really repositioned and relabeled with the correct year markers as calculated by a function I did not include above (it’s working and not relevant to this problem, I simply replaced it with the “0” for clarity).

The text-setting statement is the problem code…I’ve commented literally everything else out of the main loop to verify it. I even changed the statement to not involve any function call (simply setting the text attribute to “0”), and it still causes the final .swf to eat an extra 1% of my CPU every 15 seconds until finally the FPS crashes through the floor. The rest of the main loop has much, MUCH more complex and I’m sure inefficient code that also runs every frame, and I have no idea why that one statement would cause so much trouble.

Since this project reads a data file with a list of timeline events whose span of years I cannot predict, I do need the displayed year markers to be done dynamically in some way. The code ultimately works (I only noticed the ridiculous slowdown when I accidentally left the movie open and idle for a few minutes), but I’m quite new to Flash and entirely up for alternate solutions if they’re available. Thanks in advance for the advice!

  • 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-29T08:53:08+00:00Added an answer on May 29, 2026 at 8:53 am

    TLFText is very slow to dynamically alter, and should really only be used for text that needs that extra formatting. Dynamic Classic text is the way to go for small, changeable fields.

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

Sidebar

Related Questions

Has anyone seen this before - and can anything be done about it? This
Before you answer this I have never developed anything popular enough to attain high
I've been given some code with commenting unlike anything I've come across before: //{{{
I'm designing a game server and I have never done anything like this before.
Excuse me if this has indeed been asked before, I couldn't see anything that
This is more a curiosity question than anything else... Google instructs to add the
What problems could I get when defining NOMINMAX before anything else in my program?
Is it possible to have Greasemonkey scripts run before anything else on the page?
Before anything else, I do apologize for the following verbose question. Since I'm new
I want to write a custom validator which doesn't do anything before the user

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.