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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T16:31:03+00:00 2026-05-24T16:31:03+00:00

I have previously asked a question on AS3 and timing for games but got

  • 0

I have previously asked a question on AS3 and timing for games but got no answer so trying to make the question more precise.

I am making a game similar to Touhou in style to learn AS3, but this game is timed to music. Bullet patterns, enemy spawning and special graphics will all be timed to happen at specific times in the music. What I am wondering is:

What is the best way to accurately time many(!) events that are required to be very accurate and not slip even a tiny bit out of sync?

Example of what sort of timing I am looking:
s
Spawn 5 different types of enemy’s at 1:30 minutes, enemy 1 bullet pattern start at 1:31, bullet pattern will be timed to beat so repeat pattern every 2 seconds. This is a simple and short example of what I am trying to get at.

  • 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-24T16:31:03+00:00Added an answer on May 24, 2026 at 4:31 pm

    For object and animation timing, you should listen to ENTER_FRAME event, then get the current time in miliseconds with:

    var now:Date = new Date();
    var timeInMilis:int = now.getTime();
    

    and check if any objects need to be moved, added, etc. based on that time.

    As for sound timing, you will probably be fine by just normally playing sounds during the ENTER_FRAME event. But, flash is prone to adding latency to sounds, meaning that they will not always be played immediately after you call .play() on them (not too much, in order of milliseconds). If you need super precise timing, you might need to implement your own mixer, using the techniques described here and here.

    Good luck!

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

Sidebar

Related Questions

I have a problem similar to this question which was previously asked but my
I previously asked the question and got answer to Best approach to write query
I have previously asked two questions Question 1 and Question 2 but there is
Ok, I have previously asked a similar question to this but it was voted
I have seen this question asked previously but can not find a clear explanation
I previously asked a question regarding this , got an interesting answer which got
I have previously asked this question and since I already accepted an answer, I
I have previously asked a question to populate a page depending on which link
I have previously asked a question on how to echo the url of images
I've previously asked a question of about Delegates does anyone have a must have

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.