How to compare the time slices in 15 minutes?

Using Flash 8 Pro AS2

Have an animation to play once at the first visit to the site, regardless of the number of pages visited within the site. Then start over when to return to site.

I thought that SharedObject would work for this. I managed to do it run at the same time to visit the site and the value of the shared object. Problem is that the animation NEVER play again because the shared object is never removed.

Is there a way to put so it was like a session then that would solve this easy. I don't know how to do if there is a way.

So I decided to make the swf file to check the page reload or if come back once again, site 15 minutes has elapsed. If so, update the time in being shared right now and the animation playback.

Problem is that I have NO idea how compare the time set in the shared object at the moment to check whether or not the 15 minutes has passed.

I tried different things, but the comparison, at the end of the hour, goes into the negative numbers. I am here minutes passing between saved time and the current time. Nothing else for a few minutes.

I'm not a mathematical genius or understand all the stuff that I see out there in the tutorials and code examples, when it comes to the date and the time of calculation.

I need to be. Delete the shared object to the closure or the site navigation browser.
OR
Check if 15 minutes has passed then at day time in the shared object and read the animation

I'm just stuck in the calculation of time to determine whether or not the 15 minutes passed.

What happens if they return to the site of the days or even weeks? My minutes of follow-up test has no meaning when entering hours and days or even weeks or months. Of course, my approach does NOT work.

Any help would be great. Don't forget to Flash 8 pro and AS2 NOT AS3 or flash 9.


Thank you

I don't know how you look at the time, but if you create a DATE object:

var today: Date = new Date(); It's actually an object of date and time.

So, if you compare this date and time with an earlier date object and the object of time by using the Date method getTime() as follows

Now.getTime () - previousDate.getTime () = the number of milliseconds that have elapsed between the "previousDate' and 'now '. If the difference is > 15 * 60 * 1000, 15 minutes.

Tags: Adobe Animate

Similar Questions

  • How to compare the time

    Hi all

    I have start_time field Varchar2 (50); in my database. "and in this area, I am storing time as ' 14:34.

    Now, I have to check that start_time should be between ' 09:00 AM 'to '18:00 '.

    so I define two variable of string type in the procedure, such as:

    "v_start varchar2 (50): = ' 09:00";
    v_startend varchar2 (50): = ' 18:00 ';

    If start_time between v_start and v_startend then

    insert into...
    end if;

    This code does not work, please guide me best way I solve my problem.

    response will be appreciated.

    Hello

    If you need to store time in VARCHAR2 strings or variables, can always store in a standard format, as HH24, where the string value can be used for sorting. Otherwise, to standardize the formats running, like this:

    ...
    v_fixed_dt     VARCHAR2 (20)     := '01-Jan-2001 ';
    v_start          DATE := TO_DATE ( v_fixed_dt || '09:00 AM'
                        , 'DD-Mon-YYYY  HH:MI AM'
                        );
    v_startend      DATE := TO_DATE ( v_fixed_dt || '6:00 PM'
                        , 'DD-Mon-YYYY  HH:MI AM'
                        );
    ...
    BEGIN
    ...
         IF  TO_DATE ( v_fixed_dt || start_time
                  , 'DD-Mon-YYYY  HH:MI AM'
                  )     BETWEEN  v_start
                   AND      v_end
         THEN
             ...
    

    The string '12 h 30' comes after ' 09:00 chain' for the same reason as the sting 'TWELVE' comes after the string 'NINE '; The sort order of strings has nothing to do with their meanings (as appropriate).

  • How to set the time that my screen stays on?

    How to set the time that my screen lights up.  I have an iPod Touch 6?

    Settings > general > auto-lock

  • How to set the time between slides in a slideshow (iPhoto, el capitan)

    How to set the time to say - 5 seconds or 20 seconds - between slide show photos in iPhoto. I use el capitan.

    See the Settings button at the bottom right of the toolbar (at the bottom of the slide show). Click on it and you have a small window with two tabes, refers to all the slides, the other to the selected slide. You can make your choice

  • On Apple Watch, how to change the time when traveling to a different country, like London or Singapore?

    For Apple Watch, can someone please show me how to change the time on my watch when I travel to another country, like London or Singapore? Thank you.

    Hello

    When traveling to a different time zone, it is not necessary to manually change the time on Apple Watch.

    After turning off the flight on each of your iPhone and Apple Watch, the time on your watch can be updated automatically to reflect the local time.

    If it is not the case, try restarting your watch:

    -To switch off your watch: press and hold the button side until you see the cursor off the power; slide it to turn off.

    -To reactivate: press and hold the side button until you see the Apple logo.

  • How to compare the 2 versions of the same document in Pages?

    How to compare the 2 versions of the same document on Pages?

    There is no OS X Visual tool which can open two Pages document and show the differences between them - other than the human eye.

    What information are you interested in identify as different between the two documents? What specific version of Pages?

  • How to view the "timer" current user time

    Hello

    How to display the "timer" right now?

    Currently I have in my program using timer, how to display the current time left on the timer to warn the user the time left on the timer?

    The number of timer upward or the countdown?

    using TimerCB

    a Council does

    Thank you

    Ben

    I'm not aware of the possibility of obtaining the hour up to what a timer callback will be called, then I would say a different approach:

    If, say, you want some action to happen every 10 minutes, but I would like to update the user interface of every second indicating the remaining time I would set the timer to 1 s interval. In the reminder of the timer, I would use a setting that is incremented each time the callback is called; If this value reaches 60 x 10 I reset the parameter and call the function to get the job done. In all other cases, you can simply view 600 - setting (in seconds) than the rest of the time.

    An alternative may be to use two counters, one for the action, called every 10 minutes, and one for the update of the UI, called say every second...

  • How to prolong the time that deleted files stay for me to see

    How to prolong the time that deleted files stay for me to see

    Original title: files deleted

    How to prolong the time that deleted files stay for me to see

    Hello

    You ask about the trash?

    Files remain in the Recycle Bin until you manually clear the location or you or someone else, manages the disk cleanup.

    If you do not ask the trash, please provide details.

    Don

  • How to extend the time that your computer stays on without activity

    How to extend the time that your computer stays on without activity?

    How to extend the time that your computer stays on without activity?

    Start button > in the search box, type power options > press the Enter key > left column > click on choose when turn off display > selections for battery and plugged inare. Click on the pointer, and you can choose how long. It may be 1 minute forever. Take that seek you. > click save changes when done. For the benefits of others looking for answers, please mark as answer suggestion if it solves your problem.

  • How to compare the content of two Wordpad / documents notebook without reading them line by line?

    How to compare the content of two Wordpad / documents notebook without reading them line by line?

    Hello

    Without this feature is included in the operating system.

    However, you can use your favorite search engine to look for software that needs to perform these tasks.

    WARNING of THIRD PARTY SOFTWARE: Using third-party software, including hardware drivers can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the use of third-party software can be solved. Software using third party is at your own risk.

    Hope this information helps.

  • How to set the time stamp for incoming mail?

    How to set the time stamp for incoming mail?  I have windows vista. I use hotmail/windows live email. My computer has the time is set correctly. My e-mail timestamps incoming messages 7 hours a head of real time. Example: it is now 09:48. A new email is stamped as to settle at 16:48. How can I fix it? Note: the computer is correct.

    Thank you
    Laura
    2.13.2012

    If you mean the customer of email Windows Live Mail, the time stamp on messages is governed by your time zonesystem. Right-click on the clock in the lower right of the screen and select CONFIGURATION... Change your time zone, and then set your clock at the present time.

    If you are talking about the Windows Live Hotmail service, the time zone (s) used are those contained in your account data. Reach
    https://account.live.com/EditProf.aspx
    and change the time zones for the good...

    Windows Live programs and services have their own forums for support at the Windows Live Solution Center. Please address any questions you may have about Windows Live Mail to one of the forums on the right side of this page. For Hotmail, forums and responses are available via this page.

    Noel

  • How to reset the time in the lower right corner, so it remains set automatically

    original title: Windows Internet Explorer 8 - time

    How to reset the time in the lower right corner, so it is set automatically.

    ccrow

    The time is not defined in Internet Explorer. The time is a function of the o/s. right click on the time and see what happens.

  • How to pass the time slot to the dashboard in URL parameters

    Hi all

    Does anyone have example on how to spend the time slot to the dashboard in URL parameters?

    That's what I tried. Normally, the dashboard has timeRange as a required context, I deleted and added "startTime" and "end" like required context, so that I can spend 2 timestamps in URL, and then I created a 'extra context' called "timeRange", which calls a WCF function to create a CustomTimeRange, it works pretty well. But the problem is if I have exploration down this dashboard to a different dashboard, the slot not transmitted properly. So I guess, I was not the right way. Does anyone have an example?

    Thank you

    Xiaoning

    1 re: timeRange not spent in drilldown pages

    Please confirm that you have defined one or more entries in context "Required". If you do not, please add a (like "hostName") and re - test. It work?

    2. with 'nologin' user URL redirects to the login screen

    Yes, what is expected. With nologin user, you should always use the form http://foglight_fms:80/console/foglight_ext?viewId=system:mywcfmodule.1?hostName=myhost of the URL rather than the

    form of http://foglight_fms:80/console/page/System:mywcfmodule.1?hostname=myhost .

    It would be great if you could post a brief description of your design dashboard once you have this work. That sounds like something that the other members of the Foglight community would be very interested!

    Kind regards

    Brian Wheeldon

  • How to display the time of growth of the autoextended oracle files?

    Hello

    How to display the time of growth of the autoextended oracle files?

    Hello

    1. do you have re - seen view data dictionary in the oracle documentation?

    DBA_DATA_FILES

    dba_free_space

    dba_Tablespaces

    -Regarding (updated)

    DBA_HIST_SEG_STAT

    DBA_HIST_SNAPSHOT

    DBA_TABLESPACE_USAGE_METRICS

    DBA_HIST_TBSPC_SPACE_USAGE

    2. If not, then re - discovers once and understand the use of columns and build the query.

    3. If Yes, then why you have not tried to build queries

    4. again, if you're lazy, search in google or forums. ton of translates queries

    5. What are the disadvantage of step 4 - you will not get to learn something (0% gain of knowledge).  If you really want to learn, then try to learn to build query, and try to understand the views of data dictionary

    6. When you spend above task at the end of the task you will get satistided with two things

    --> Understand how to use the Oracle docs for help and where to look in the future

    --> Your skills / knowledge gain - trust me it will make you another step to learn new things.

    7. If you don't know SQL, learn the basics takes hardly 2 to 3 hours and then you can build query.

    It may be useful

    -Pavan Kumar N

  • HOW TO COMPARE THE REGULAR TEACHER VS VERSIONS?

    HOW TO COMPARE THE REGULAR TEACHER VS VERSIONS?

    Thank you

    An educational version of Photoshop Elements are totally same (feature wise) than the regular commercial versions. So, it is unnecessary to compare.

Maybe you are looking for

  • Tecra M11 - RAM compatibility

    Thought to replace the ram that exists with G.Skill Ripjaws SO-DIMM F3-1600C11D-8GRSL 1.35v (low voltage) 8 GB Kit (4Gx2) DDR3 1600 Not sure that it is compatible. I doubt that it is compatible with 8 GB of ram.Please advice.

  • DRM activator application has stopped working

    play the games of big fish and a few weeks ago drmactivator application has stopped working shows up as a message and I can not play all games except those supplied with the computer - how can I fix this problem

  • Data retrieval

    recently, I reformatted my computer (HP with Vista) but I forgot to copy one of my important data folder. Is it possible that I can return the data from formatted hard disk? Any suggestions?

  • FS8600 - we can create a second basin NAS?

    FS8600 - we can create a second basin NAS?

  • Unable to connect Wifi iPad

    Separated from this thread. My iPad is having the same problem and I did nothing to him. I update my iPhone 5 in the 8OS but firmware which should have no effect on my iPad. The iPad has worked with my WiFi DSL without problems before today. Is there