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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:19:53+00:00 2026-05-28T06:19:53+00:00

I am having an issue with adding dynamic content through an interval. The content

  • 0

I am having an issue with adding dynamic content through an interval. The content is being added to the screen, but the X position, as well as the tween, seem to be completely out of sink.

The below is a screenshot when the interval is at 100 milliseconds, as it shows it best. The application needs to work at 200 milliseconds (where the error is not as clear, but the lines are still occationally too close, roughly every 4th).

Error

As can be seen, there is a clear discrepancy between positioning. It remains fine for a few, then changes, changes again and then finally reverts back to what it was.

Here is my code that controls this section:

function XYZ(){ 
Score = 90
var timeBefore = Score

if(timeBefore <= 2.4){
    timeBefore = 2.5
    Score = "2.5"
}
else if(timeBefore > 75){
    timeBefore = 2.5
    Score = "2.5"
}

trace(timeBefore)
var signInterval:uint = setInterval (addThis, 100);
var finishInterval:uint = setInterval (checkThis, timeBefore*200);
MCArray.push(signInterval), MCArray.push(finishInterval)
}

function addThis(){
    trace("Adding this!")
    timeElap++
    var floorNum:sign = new sign
    //floorNum.visible = false
    floorNum.y = 325
    floorNum.x = 0 - floorNum.width
    floorNum.dtf_num.text = timeElap+""
    addChildAt(floorNum, 1)
    trace(stage.stageWidth+floorNum.width)
    trace(floorNum.width)
    TweenMax.to(floorNum, 1.5, {x:stage.stageWidth+floorNum.width, ease:Linear.easeNone})
    floorSigns.push(floorNum)
}

Anyone with any ideas as to what is causing this to happen?

Note: It also happens with 200 and 300 milliseconds, although less prominent.

  • 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-28T06:19:53+00:00Added an answer on May 28, 2026 at 6:19 am

    setInterval() and setTimer() aren’t nearly as precise as you might think they are. They are, at best, hints to the avm of when you would like a function to run. Here is a article that is about JavaScript but is applicable to actionscript as well.

    You will need to change your architecture and the way that you are approaching the problem. You want to create an ENTER_FRAME handler and then use getTimer() to determine how much time is elapsed, and what you need to create/position and schedule.

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

Sidebar

Related Questions

I'm having issue with a simple code downloading a remote image and adding content
I am having an issue adding posts to LiveJournal via the xmlrpc api they
i'm having this issue, in ASP.NET MVC 2 where I'm adding a drop down
Having an issue here that I have tried everything I can think of but
I'm having an issue with a Flash/Flex erroring in Firefox but not IE. I
I'm having this issue where doxygen is adding the method twice in the documentation
I am having an issue with creating and adding sales/quote_address objects to the multishipping
I am having an issue with a javascript for loop. I am adding up
I am having an issue that I discussed on the Haxe IRC channel but
I'm having an issue programmatically adding a subview to a UITableView cell. I am

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.