Timing how long a frame has been active

I am trying to time how long a frame as been the active
frame. Once the frame is displayed, if the user doesnt press a
button to move to another frame after 6 seconds, the movie should
jump back to the previous frame it was at. I think the setInterval
function would be correct to use here to time the 6 seconds, but im
not sure how to clear the interval after. Here is my logic, (i know
this isnt correctly coded..)
If a button was pressed before the 6 seconds has elapsed,
then it would not jump to frame5, i think.. but im not really sure
if this will work for what i am tryin to do, and if there is a
simpler way. thanks for any advice

onEnterFrame does NOT execute once when the frame is entered
(despite its name). it executes repeatedly (ie, it starts a loop)
starting when the frame that contains its code is entered and
continues until the timeline to which it's attached no longer
exists or a delete onEnterFrame is executed.
in addition, you should always precede your setInterval()
statement with a clearInterval(). especially, when your setInterval
is attached to a frame. it's almost guaranteed that you'll have a
mess on your hands if you use the code given by madmac, unless you
add that clearInterval().

Similar Messages

  • How can I tell how long a request has been sitting on an execute queue?

    Is it possible to determine (in WL 8.1 and/or 10.3) how long an HTTP request has been sitting on the execute queue before being assigned to a servlet?
    Under heavy load, I'm finding that the caller times out by the time the servlet tries to write the response because the request has been waiting on the execute queue for too long. To prevent doing all the work to process the request, I want to be able to see how long the request has been waiting to determine whether it's worth processing the request.
    Currently I use the getExecuteThreadTotalCount() method in ExecuteQueueRuntimeMBean and assume that if the count is high, the request has probably been waiting for a while, but getting the actual time on the queue would be much better.
    Thanks.

    Further investigation and a bunch of speed tests later, I'm even more puzzled. Between 7 pm and 9pm this evening, download speed has been consistently at 112kb, except for the 1 in 10 occasions where it hits 1.5mb, for 30 or 40 seconds, before dropping back to 112kb.
    Does anyone have any ideas what is going on?
    thanks in advance
    Ben

  • Is there a way to find out how long my child has been playing with my ipad

    Is there a way to find out how long my child has been playing with my ipad???  He has been getting up before me in the morning and in the evening he is super tired and I'm wondering how early he has been getting up????

    No way to see exactly how long the iPad has been used but you may want to consider using parental controls.
    iOS: Understanding Restrictions (parental controls)

  • Working out how long a program has been run for

    i hav a server and on the stats report it makes i wanna show how long its been running for since it started
    i have a start date and time
    and a ill grab the current date and time when i run this method
    but what code would compair them and work out how long the server has actually been running for
    can i do it using these 2 days or do i need another counter thread just counting up in seconds then min then hours then days n so on ?
    Message was edited by:
    russdx

         private final static int SECOND = 1000;
         private final static int MINUTE = SECOND * 60;
         private final static int HOUR = MINUTE * 60;
         private final static int DAY = HOUR * 24;
         public static void main (String[] args)
              long time = System.currentTimeMillis();
              long days = time / DAY;
              time -= days * DAY;
              long hours = time / HOUR;
              time -= hours * HOUR;
              long minutes = time / MINUTE;
              time -= minutes * MINUTE;
              long seconds = time / SECOND;
              System.out.println (days + " days, " + hours + " hours, " + minutes + " minutes, " + seconds + " seconds");
         }Ted.

  • Recording info about how long an application has been open?

    Hi. I would like to set up some kind of log that tells me when I've opened a particular application (Final Cut Pro) and how long (how many minutes/hours) the application has been open for that particular session or that particular day.
    Ideally, the log would have the new information appended to the end of it each day; it wouldn't delete/refresh/overwrite itself -- so at the end of, say, six months, I could look at the log and see, Oh, I used Final Cut on Tuesday, April whatever, for 10 hours, and then on Friday, May whatever, for another 12 -- without having to know about any other activity with any other application on my system.
    Is there an easy way to do this with OS X 10.4.5? Can Automator do this for me? (Didn't notice an FCP icon in the library of applications Automator can act upon.) Do I need to use AppleScript?
    Thanks!
    PowerMac G5   Mac OS X (10.4.5)  

    Hi, R.G.
    You might also want to look into some of these applications.
    When looking for new applications, I recommend searching MacUpdate or Version Tracker. The user-submitted reviews accompanying the listings are helpful in sorting the wheat from the chaff.
    Good luck!
    Dr. Smoke
    Author: Troubleshooting Mac® OS X

  • How can I tell how long my Mac has been on?

    I know there are a couple of widgets that do this, but if I don't have those, how can I tell how long it's been since I last booted my Mac? Seems like, at a minimum, there would be a Unix command that would tell me this.
    Thanks!

    open terminal:
    uptime <enter>
    my uptime:
    21:29 up 2 days, 3:38, 2 users, load averages: 0.09 0.16 0.08
    (clock, uptime, users, load)

  • New update of podcast app, there is no way to see how long your podcast has been on go?

    When listening to a podcast and you want to see how long you have left, there is now no longer an option to see this?
    Your also unable to drag/skip to a part of the podcast easily

    @Christine – try the following ExtendScript (JavaScript):
    if(app.selection.length === 0
        || !app.selection[0].constructor.name === "Cell"
        || !app.selection[0].constructor.name === "Table"){
        exit(0);
    var sel = app.selection[0];
    if(sel.constructor.name === "Cell"){
        var tableRowLength = sel.parent.rows.everyItem().getElements().length;
    if(sel.constructor.name === "Table"){
        alert("All "+sel.rows.everyItem().getElements().length+" rows selected in current table." );
        exit(0);
    var numberOfRowsSelected = sel.rows.length;
    var indexOfSelectedRows = sel.rows.everyItem().index;
    var startRowSel = indexOfSelectedRows[0]+1;
    var endRowSel = indexOfSelectedRows.length+indexOfSelectedRows[0];
    alert(numberOfRowsSelected +" row(s) selected.\r"+startRowSel+" to "+endRowSel+" out of "+tableRowLength+" of current table.");
    You need not select whole rows, just one or a couple of cells.
    Then run the script.
    An alert message is telling you how many rows belong to the cell range you have selected and:
    which rows of the table are selected…
    A typical message would be:
    6 row(s) selected.
    3 to 8 out of 20 of current table.
    The script does some basic checks of the selection.
    If no cell or table is selected, it will just do nothing…
    Uwe
    Message was edited by: Laubender | Some language cosmetics in the alert message

  • I purchased an ipad from a dealer on ebay with a 9 month warranty still on it.  I set it up and decided to return it and buy the new Ipad instead. How can I be sure I didn't activate the warranty, or deactivate if it has been activated?

    I purchased an ipad from a dealer on ebay with a 9 month warranty still on it.  I set it up and decided to return it and buy the new Ipad instead. How can I be sure I didn't activate the warranty, or deactivate if it has been activated?

    Sorry, I can't tell what it is you're trying to ask. What does the warranty have to do with your intention to return the iPad (to whomever) and get another one?
    There's no way to deactivate a warranty.
    The warranty transfers with the machine, has nothing to do with the owner.
    Look around in the Support pages, you can figure out a way to type in your serial number and see what your current warranty status is.

  • HT5622 How can I get on ICloud when it say the maximum number of free accounts has been activated on this iPad?

    How can I get on iCloud when it say the maximum number of free accounts has been activated on this IPad?

    A maximum of three new iCloud accounts can be created on a single iOS device. If you have already created three iCloud accounts (why?) then log in using one of those to start using it.
    Otherwise, you'll have to find another device to create an iCloud account on.

  • I tried to sign in iCloud's but it is written that "maximum number of accounts has been activated on this mobile". How to correct it?? It is not working

    I tried to sign in iCloud's but it is written that "maximum number of accounts has been activated on this mobile". How to correct it?? It is not working

    Q: I tried to create an iCloud account,  but I received this message: “Cannot sign in. The maximum number of free accounts have been activated on this iPhone.” What does this mean?
    A: Apple limits users to 3 iCloud accounts meaning you can only create three iCloud accounts on an iOS device. You are seeing this error because you are trying to create the fourth iCloud account on your iOS device (iPad, iPod or iPhone). Unfortunately it seems that all (3) iCloud accounts have been created and you can’t create a new iCloud account on this device. Restoring or resetting your device will NOT change this. Your options are to either re-use one of the accounts that you previously created, or create a new iCloud account on a different iOS device or Mac.

  • How do I know which workflow has been activated for my SHC in SRM

    Hi Experts ,
    Can anyone tell me where to find which workflow has been activated to my Shopping cart in the SRM. so that it creates a PO in the backend
    To create a PO in the back end it should have a WF actiavted.
    do we can have only always one WF activated or can we have multiple WFs depending on the conditions for one scenario
    Please suggest me
    Regards
    Sairam.

    Cross-Application Basic Settings u2192 SAP Business Workflow u2192 Perform Task-Specific Cusomizing
    SAP u2192 SRM u2192 SRM-EBP u2192 SRM-EBP-WFL
           -   WS10000060 (Automatic approval)
             -   WS10000129 (One-step approval)
             -   WS10000031 (Two-step approval)
             -   WS10000276 (Approval single-level over limit)
             -   WS14000044 (Completion by purchaser)
             -   WS14000109 (Approval n-step over value limit)
             -   WS14500015 (Item approval)
             -   WS14000045 (Delete shopping cart after application error)
             -   WS10000202 (Transfer purchase requisition)
             -   WS10000215 (Resubmission of shopping cart by administrator)
    You need to check Event linkage is either Activated or Deactivated aor these above work flow . I fit is activated it shows green light.
    Muthu
    Edited by: muthuraman on Jul 29, 2008 2:38 PM

  • Error message: ni: A frame has been dropped and the acqusition has been canceled

    I use a NI PCIe 1433 framegrabber with a Basler spl4096-140km line camera.
    Using triggered acqusition with an external source, I can get a framerate of 68500Hz in NI-MAX.
    When I use the Matlab image acquisiton toolbox to acquire data, I however very often get the error message: 'ni: A frame has been dropped and the acqusition has been canceled". This happens even at much lower framerates (20kHz) and only seems to go away when acquiring data slowly.
    Computer is a Dell Precision 7600 and I assume there should be no issues with RAM or the PC being slow. The error does not go away when reducing the data size (i.e. reducing the ROI to one single point that is readout).
    Do you have any pointers why this error message appears and what can be done about it?
    Thank you!
    Reto

    Hello,
    I encountered the same problem and I think it is because the allowcation of storage in matlab cannot catch up with that of the camera so that it will drop frames when the buffer is full.
    I also want to know how to solve that.
    Yang

  • IPhone 4 Can't receive incoming calls and sms after 3G has been activated

    I can't receive incoming calls and sms on my iPhone 4 after the 3G connection has been activated and used actively by me. Outgoing calls and messages do work and as long as I use the Wi-Fi connection everything's fine but the problem appears after switching to 3G. Any help? Thx in advance!  

    I think the next step is to do a reset by holding the sleep and home buttons down at the same time until the Apple logo appears.  If you haven't done this before, keep holding the buttons when the turn off slider appears.  The screen will go black and after what seems like an eternity, actually several seconds, the Apple logo will appear.  When the logo appears, release the buttons.

  • Strange IMAQ Error Message: "ni: A frame has been dropped and the acquisition has been canceled."

    Hello,
    I am getting a strange error trying to use the NI PCIe-1427 with the MATLAB image acquisition toolbox configured with continuous acquisition.  After about 5 minutes of acquisition, I get the error below:
    ??? ni: A frame has been dropped and the acquisition has been canceled.
    Does anyone have any clues as to why I am getting this error / where I can find out what causes it?  I need to acquire several hours worth of data and this error completely aborts my acquisition.
      --Y

    Hello,
    Turns out that I found the problem.  I had a slow memory allocation in my MATLAB code and this delay allowed too many frames to be accumulated in memory.  I still do not know the source of the exact text of the error, but upon removing the slow memory allocation the error no longer occurs.  I believe that it may have resulted from a buffer overrun of some sort in the underlying driver.
    Given that this no longer poses a problem for me, I will not pursue it further.
    Thank you for your help!

  • GF 3.1.1 Admin Console Freeze -- A long-running process has been detected

    I installed Glassfish 3.1.1 on both sparc and intel servers for solaris 10 & 11 platform. All my servers have the same symptom when I access the admin console. The console freezed and pop-up a message "A long-running process has been detected". There is nothing I can do at this point. I've tried accessing from different PC with different browsers (IE, Firefox 5, Chrome and Safari), but nothing is working including clearing the cache. Also, tried uninstall and install again (with and without updatetool) many times. Any idea how do I stop the popup message? Am I the only one has this problem? I'm using JDK 1.7 (GF 3.1.1 support JAVA 7). I need help!!!!!
    Thanks,
    - Johnny

    The only fix I know of for this issue is to reboot the host.
    If there is another fix someone please let me know as I have users who run into this often.
    Thanks
    Bonnie.Partridge

Maybe you are looking for

  • Threading in ABAP?

    I have a scenario (Order taking) where the execution logic takes considerable time to finish the processing. As a result, the end user who is using the web application has to wait for at-least 10 minutes till the processing is complete. In the UI (We

  • Mouse moves on its own

    hey, does anyone have the same problem? my mouse on the screen moves on its own and presses random buttons:( so annoying I haven't had this computer even a year and its giving me a problem. I use logitec wireless mouse. is there anything i need to se

  • Panasonic GH2 video files not compatible

    iMovie (and Final Cut) cannot import the mts video files from the latest video cam by Panasonic the GH2 BTW: RAW photos also dont import in iPhoto.. Apple is not ready for the GH2 yet.... Hoping for an update soon

  • Safari unable to clear cookies and cache

    Each time I reset Safari it is supposed to clear cookies and the cache, yet I do a reset, continue browsing and return to a site like hotmail and I'm still signed in... If I reset Safari and go right back to hotmail it's OK, but any delay and continu

  • HT4906 when i try to update iPhoto in apps it keeps asking me to sign in but aim already signed in how do i fix this please help

    when i try to update my iphoto in app store it keeps asking me to sign in to my account but i am already signed in can someone please tell me how to fix this.