Is it possible to make a timer with AS3 which is accurate upto one millisecond.

I am new to AS3. I have somehow developed a auditory and visual reaction timer by taking script from here and there. I know its not accurate and I also know that I will write it correctly when I have learned the script thoroughly,
But I was checking the net about the timer class and various posts on it and  I am vexed with a question "if its possible to make an accurate timer with AS3?" can somebody please tell me for sure. and I will be grateful if I know how to make it correctly. I can post the code which I have written ( assembled ).

the answer is, maybe. but for, for most coders, the answer is, no.
getTimer() is accurate to within 1 ms.  but that allows you to determine time/elapsed time and does not call or execute code on a regular timed schedule. it can be used with the timer class or enterframe events to do some things accurately.
however, the timer class is not accurate in the way beginning coders think.  it will, on average, allow calling a function at close to the designated interval if there are no performance issues with your swf.  it does not allow each function call to occur at a regular interval.

Similar Messages

  • Is it possible to make a printscreen with an apple 4s 16GB. And if so how?

    is it possible to make a printscreen with an apple 4s 16GB. And if so how?

    Like a screenshot?
    Quickly press then release the home and power buttons at the same time.

  • Is it possible to make an order with danish keyboard and documentation

    Hallo
    I need a computer with danish keyboard so my question is
    Is it possible to make an order with danish keyboard and documentation
    Jesper Nielsen

    You can give each track its own artwork. iTunes will normally display the artwork of track 1 in album listings. The individual track art will show in the small window at the top of the screen when playing, or the artwork panel of the mini player, or the now playing window on a device. Try it and see.
    tt2

  • Is it possible to make a button with multiple paths?

    Hello and good day Everyone
    I want to make a flash game with a map leading to various places for example school or beach like this http://www.yotreat.com/sites/default/files/190-160_1286.jpg
    if the player goes to the school she will find the teacher, and if the player goes to the beach se will find the coach.
    How can I make the player (for example) talks to the teacher at school, returns to the main map, and goes to the beach to talk with the coach, yet if she goes to the school again, the dialogue with the teacher won't be the same with first dialogue?
    =>>> Is it possible to make a button with different paths to go? As if you've watched frame A, then you push the same button again it will take you to frame B??? <<<=
    Sorry for my confusing description... I hope you get the idea >,<
    Im so desperate... I've been searching for articles about this since yesterday and I still can't find one to solve this problem of mine.
    Making games is my dream... I've made some very simple games, but I want to try a new level of difficulty
    Please help me? (>o<

    Thank you for the advice, sir Ned Murphy!
    Yes, I try to use variables now, but face another problem with it... would you please tell me what's wrong with my script?
    Here, in label: "School" I type:
    on (release) {
    if (point = 0){
    gotoAndStop("dialogue1");
    else if (point = 10){
    gotoAndStop("dialogue2");
    else {
    gotoAndStop("dialogue3");
    (it's only a testing, so I only use these 4 labels)
    and in label: "dialogue1", "dialogue2",and "dialogue3" I type:
    on (release) {point += 10;}
    on (release) {
    _root.gotoAndStop("school");
    The result when I test movie:
    1. At "School" (shows point=0), I click the button,
    2. then occurs "dialogue2" (shows point=10), I click the button,
    3. then back at "school" (shows point=20), I click the button,
    4. then occurs "dialogue2" again (shows point=10)
    even the first shot is wrong
    point=0 should be the entrance to "dialogue1", but all I can get is "dialogue2"...
    Please tell me what's wrong with my script, sir Ned Murphy,
    Thank you very  much
    Regards,
    Tami

  • Portege R600 - Is it possible to make a call with the SIM?

    Hi,
    I wonder if its possible to use the Wireless connection manager 5 and to make or receive a call?

    Hi,
    I see that nobody answered so i will try to explain what i meant -
    Is it possible to make audio call with the Wireless Manager by the GSM modem module?
    I succeed to send SMS and to connect to HSPA data services but i dont find any reason why i can not connect to the GSM and make a call.
    I have Portege R600 model PPR61E-01C00NG3
    I even succeed to use the GPS that probably installed in the GSM/HSPA modem (wireless manager 5).
    If anyone can explain how and if it possible to make a call please send your reply ... i wnat to use the laptop with BT instead of cell phone ....
    Thanks
    Yan

  • Is it possible to make a movie with QuickTime Pro?

    I post this here cuz i posted it in the "QuickTime" Section and like...no one answered so maybe somone here will answer me...
    is it possible tom make image slideshows with music then put this on a CD or a DVD and watch it on you DVD player? PLease...Thanxz...xXxmartinxXx

    To make the slideshow...
    http://www.apple.com/quicktime/tutorials/slideshow.html
    To add music...
    http://www.apple.com/quicktime/tutorials/addmusic.html
    I may be mistaken, but I do not belive that quicktime lets you burn DVDs. Search google for a program that lets you burn quicktime movies to DVD.
    btabz

  • Is it possible to set lead time with reference to Inco term

    Is it possible to set lead time with reference to Inco term.I want to capture transit time in combination of Vendor & Material with reference to Inco term. Any other provision except the field of Plnd delivery time of Info record & GR processing time of Material Master.

    Hi,
    Your planned dely time should consider this.I think not possible.
    Thanks
    suresh

  • Is it possible to make master pages with several  title in one file? & Can I define page range from

    Is it possible to make master pages with several  title in one file? & Can I define page range from which page to which should be specific title?

    While the number of master pages is not unlimited, you can have quite a few in any file. I've never seen the limit documented, but it's in the hundreds, or more likely thousands. There is, I believe, a page limit of 9999 pages per document, but I don't know if that includes the masters or if they are counted separately.
    You can choose a page range in the Pages panel, then assign a master to them manually, and I beleive there are some scripts floating around that can assign a master page based on the appearance of a paragraph style (for chapter start pages, for example).

  • Is it possible to use face time with my iphone4 with 3G  when the wi-fi is not avalable because my friend own a 4S and he can? Thank you...

    Is it possible to use face time with my iphone4 with 3G when the wi-fi is not avalable

    Hi,
    The Blurb
    The * items message that is at the bottom
    *FaceTime video calling requires a FaceTime-enabled device for the caller and recipient and a Wi-Fi connection. FaceTime over a mobile network requires iPhone 4S, iPhone 5 or iPad (3rd generation) with mobile data capability. Availability over a mobile network depends on carrier policies; data charges may apply.
    Some features may not be available in all countries or all areas. Click here to see complete list.
    It is not specifically saying it is 4G only phones.
    It is not saying it is 3G either.
    It is not listing an iPhone 4  (only the 4S)
    It seems whether 3G can or cannot or if the iPhone can do 4G and it is available it seems that particular model will not.
    10:26 PM      Friday; March 29, 2013
      iMac 2.5Ghz 5i 2011 (Mountain Lion 10.8.3)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • How to Make a Timer with Milliseconds

    I am trying to create a timer that tracks milliseconds. The reason being is that I want to track key strokes, store them, and later repeat them. In order to repeat each key's input interval accurately, I need to
    track amount of time each key is pressed between each other and to do so I plan to record by the millisecond. I won't be storing each millisecond but rather I want to make sure that the Controls.TextType and Timer event can be processed at any moment. From
    my observation, I can't go any lower than one second because, realistically, multiple keys can be pressed in less than a second and also I can't recreate one second (accurately) out of milliseconds unless its ticking by one millisecond. As far as I know, I
    can use the Timer object but I encountered a limitation. The Timer.Interval only goes as low as 10 milliseconds. I looked at other options and considered using Clock.Millsecond and subtracting two versions of Clock.Millisecond at a millisecond difference but
    did not manage to make a working sample.
    I also tried using using Program.Delay() but I don't understand how this doesn't measure one millisecond:
    gw = 600
    gh = 300
    GraphicsWindow.Width = gw
    GraphicsWindow.Height = gh
    GraphicsWindow.KeyDown = onKeyDown
    GraphicsWindow.KeyUp = onKeyUp
    GraphicsWindow.Left = 0
    GraphicsWindow.Top = (Desktop.Height - gh)*0.20
    TextWindow.Left = (Desktop.Width - gw)*0.90
    TextWindow.Top = (Desktop.Height - gh)*0.20
    txtSize = 20
    tx = (gw - txtSize)*0.20
    ty = (gh - txtSize)*0.50
    GraphicsWindow.FontSize = txtSize
    GraphicsWindow.DrawText(tx,ty,"CLICK GRAPHICS WINDOW SCREEN THEN")
    GraphicsWindow.DrawText(tx,ty+txtSize,"PRESS ENTER TO USE KEY EVENT")
    milliSec = 0
    sec = 0
    print = "True"
    While "True"
    milliSec = milliSec + 1
    If (milliSec > 999) Then
    milliSec = 0
    sec = sec + 1
    TextWindow.WriteLine(sec)
    EndIf
    If (keyDown["Return"] And print = "True") Then
    TextWindow.WriteLine("You pressed at " + sec + ":" + milliSec)
    print = "False"
    ElseIf (keyDown["Return"] <> "True") Then
    print = "True"
    EndIf
    Program.Delay(1)
    EndWhile
    Sub onKeyDown
    lastKey = GraphicsWindow.LastKey
    keyDown[lastKey] = "True"
    EndSub
    Sub onKeyUp
    lastKey = GraphicsWindow.LastKey
    keyDown[lastKey] = "False"
    EndSub
    Why do I suspect my timer isn't accurate? For one, when I count by one (like so one crocodile, two crocodile, etc) it doesn't match up. Also, I've compared it with many online stop watches and it's apparent they run seconds ahead.
    My three options:
    1) use the Timer object
    2) use Clock.Millisecond
    3) use Program.Delay
    After constant failure and researching, I forgot to consider what is the default rate of a small basic program when its running as a whole and each line. Is it possible to go lower than it? Again the current goal
    of my project at the moment is tracking a key stroke and returning the time the user inputted. That's why, I want my timer to move
    by one millisecond so I am able to process every action. Any explanation, samples, or guidance would be helpful. Thank you.

    Program Code: FRT619
    Removing the comments tags (from the last three lines at the bottom of the mainTimer subroutine) will show that I can store time values and rely on the fact that they can be compared. It's no where near completion
    but, hypothetically, this will allow me to achieve my main goal: storing time intervals from any key and repeat them at the user's command accurately when the timer restarts. I'm sure I've compromised the timer's accuracy though. What are your thoughts? Do
    you see a better way to approach this problem? Also, I wasn't able to display the milliseconds but realized that it may not be necessary since I only need it to process events and store variable accurately. Not to display the precise time. Although, I am open
    to any solutions to this minor problem. One more note: I nested the main loop with a small loop that changes run to true when milliseconds is zero. This is used to assure that milliSec has an initial value of zero, which is crucial to store time accurately.
    Bug: Timer stops if user holds enter key. Solution: remove program delay in sub routine control, however, user can't hold key and record same key multiple times.
    New Solution to bug: implement button and textbox events (allows user input while recording time through PC's clock--in milliseconds).
    On a side note, the clock object communicates with the PC's clock, which would mean it's asynchronous from the program and isn't affected by program delay. However, if the PC's clock is ticking by the millisecond(s) and the program stores the time from the
    PC's clock and display it with a delay of 1000 milliseconds. The clock object may not be affect but displaying the time will be?

  • Is it possible to make a graph with drag and drop plots and use it as a control?

    I am trying to make a graph with multippel plots to use as a control, the plots should be drag and drop. Is this possible in LV 7.0 or do i have to use c++ or WB?

    I second Doc-Doc comment. I am not sure what you are asking.
    The attached is an example I found on the NI web-site some time ago. I cannot find the link again so here is a ZIP of what I found in a temp folder on my machine.
    Trying to help,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction
    Attachments:
    WF_SketchPad.ZIP ‏67 KB

  • I am busy making a website with iweb. Do you know if it is possible to make a page with a slideshow which does not contain jpg's but other documents?

    I am busy making a website with iweb. Can I only make a page with a slideshow containing jpg's? I would like to make a (pages) document with pictures and have this as a slideshow. Is that possible?

    If you use Keynote rather than Pages you can export as HTML to get a slideshow...
    http://www.iwebformusicians.com/Banner-Slideshow/HTML-Slideshow.html
    Or you can use a JQuery slider that will display text, images, movies etc...
    http://www.iwebformusicians.com/Banner-Slideshow/Anything-JQuery-Slider.html

  • Is it possible to make 2 time machine back-ups on the same disk

    Hi, i have 2 MacBook Pros, I have a time machine back-up for the newer one on my 500GB hard drive
    I went to boot camp my other mac and it says I have to format the hard-drive, so I want to back everything on the old mac up, is it possible to make a seperate time machine back-up on the same external hard drive as I don't want to overwrite the back-up for my new mac? How can I do this
    Thanks

    andy.lawrence wrote:
    you might have mentioned this before, but once I have partitioned my external drive, how can I go about re-formatting the old mac hard drive and then restoring my data back onto it?
    You don't have to re-format it first; you need to erase and restore to "pack" everything into the first part of the drive so there's enough room on the rest of it for +Boot Camp+ to make a partition.
    See #14 in [Time Machine - Frequently Asked Questions|http://web.me.com/pondini/Time_Machine/FAQ.html] (or use the link in *User Tips* at the top of this forum).
    Then use +Boot Camp+ to make the second partition.
    Also, would it be better to run the OS X install disc, re-format the hard drive, and then when running setup assistant migrate all my information from the time machine back-up?
    No. You'd have to install OSX, then use +Setup Assistant,+ then download and install the "combo" update (and other updates) to get back to the version of OSX you're running. And you might have to re-authorize and/or reinstall some 3rd-party apps.
    If i do this, at the moment Im running snow leopard but the install disc is simply leopard, will this matter once I've migrated all my data across?
    Do not use a Leopard Install disc to restore a Snow Leopard backup. It can copy everything, but the result either won't start or will kernel panic on startup. You must use a Snow Leopard Install disc.
    (And please update your signature, via the +My settings+ link at the right.)

  • Is it possible to make an album, with seperate, and different artwork for each track? Thanks.

    Got a few tracks and I was wondering if its possible to make like an album, but each track different art?  

    You can give each track its own artwork. iTunes will normally display the artwork of track 1 in album listings. The individual track art will show in the small window at the top of the screen when playing, or the artwork panel of the mini player, or the now playing window on a device. Try it and see.
    tt2

  • Possible to make a Time Capsule actually work?

    We have an original Time Capsule. It has never worked well enough for a reasoned person to be satisified. It has, on two separate occasions it did actually back up a computer. Many many times it was left for days and days to back up and it never completed. I understand it can take a stupid long time for initial wireless backups with a TC. This one ran for ten days once and no joy.
    We took it to the apple store. they said it is fine, they reset it.
    It doesn't show up wirelessly. The instructions don;t really help one get it to show up on a wireless network.
    This is the single most frustrating big ticket item we've ever purchased. The angrily defensive sales tech told my calm happy smiling wife that it is a fine functioning product, and she is just not tech savvy enough to use it. We are terribly frustrated.
    Anyone know how to make one of these things work at all? or better yet, any one know of a way we can dispose of this overheating rip-off without poisoning the environment and maybe get some of our money back?
    thanks

    The answer to your subject line is YES - millions upon millions of people have with no problems
    Are you using it only for backup, as a wireless base station, as a wired router or some combination of there three capabilities?
    as to disposing of it - sell it on EBay
    LN

Maybe you are looking for

  • Error while trying to replicate current environment

    Hello all, Bi server throws these errors after uploading and restarting RPDs. I am trying to replicate the current environment, not able to understand whats causing the error. Could anybody help me with this. <Aug 19, 2011 10:39:58 PM PDT> <Error> <o

  • Crop as a saved preset?

    Hi, I am trying to find my way, of how to submit my photos to the external lab for printing. Print module is kind of useless for me - the page setup is printer driver dependant and none of my installed printer drivers allows me to define borderless p

  • STRANGE TEMPLATE ISSUES

    Ok here is my quandry , I create a Template using a series of layers , I then make the daughter pages for the rest of the website , now If I want to add another layer to my template and the update that to all the daughter pages then some of the pages

  • Type-ahead like in address book?

    I'm developing a simple app that displays a list, on selection the item details are displayed. Since the list is very long, I'm looking for type-ahead capability like the address book has (e.g. on 6310i). Is this possible with MIDP? Thanks, Andi

  • Architectural software.

    I have an iMac running OSX 10.8.5 and am looking for a 2D architectural design program. I want to be able to create blueprints for residential designs. Thnaks! Richie