need for actionscrip for a charge timer

Hi people,

I was hoping someone could point me in the right direction. I need actionscrip for a timer that counts at the same time, days, months, and years to a date and time in the past. all imput would be appreciated.

Adam

Hello

I do want to answer myself, but I had the problem solved by combining the two actionscripts and making a few changes. Thanks for the help. Here's what I came with:

oldDate = new Date (2006,8,26,15,00); September 26

now = new Date(); today

elapsed = Nouvelle_date - oldDate; milliseconds elapsed

Some examples of information
days = (now-oldDate) / 1000/60/60/24;
daysRound = Math.floor (days);
hours = (now-oldDate) / 1000/60/60-(24*daysRound);
hoursRound = Math.floor (hours);
minutes = (now-oldDate) / 1000/60-(24*60*daysRound)-(60*hoursRound);
minutesRound = Math.floor (minutes);
seconds = (now-oldDate) / 1000-(24*60*60*daysRound)-(60*60*hoursRound)-(60*minutesRound);
secondsRound = Math.round (seconds);
If (secondsRound == 1) {}
s = "second";
} else {}
s = "seconds";
}
If (minutesRound == 1) {}
min = "minute."
} else {}
min = "minutes";
}
If (hoursRound == 1) {}
HR = "hour";
} else {}
HR = "hours";
}
If (daysRound == 1) {}
DY = "day";
} else {}
DY = "days";
}
timeSince = daysRound + dy + hoursRound + RH + minutesRound + min + secondsRound + s;

Tags: Adobe Animate

Similar Questions

  • It's about code for a charge timer...

    I created a custom account the stopwatch and I wrote the code. But I would like to '0' dynamic text I created in Flash to be the meter not a random number that appears when I start the meter. What should I do so that he can recognize the '0', I typed in a text that field where it should began to count? Does make sense?

    Here is the code:

    var startT:Number = 1;

    var endT:Number = 8000000;

    var tf:TextField = this.createTextField("hello_txt",0,10,10,100,20) ('meter', this.getNextHighestDepth (), 10, 10, 300, 22);

    onEnterFrame = function)

    {

    If (startT > = endT)

    {

    delete onEnterFrame;

    TF. Text = String (endT);

    }

    on the other

    {

    TF. Text = String (startT);

    startT += 1;

    }

    }

    what you enter in the textfield ide is has nothing to do with the textfield (tf = meter) that you create in code.

    the easiest thing for you to do is to change your textfield on stage in a dynamic textfield (it is now), set its instance name to tf and remove this code createTextField.  Repeat the test.

  • Canvio Basics 2.5 500 GB needs for a long time to transfer files

    To transfer approximately 150 GB (video and photos) from a Basics 2.5 Canvio external hard disk 500 GB my computer indicates a duration of 16 hours. I've never seen those moments there high with the other external hard drive. Why?
    Thank you

    https://Forum.Toshiba.EU/showthread...322#post334322

    It will be useful,
    Mario

  • Xperia Z3 of charging for the first time

    So my sister bought me a Xperia Z3 about 2 days ago and it has just emptied. Are there specific times on how long should I charge my phone for the first time?

    No, these new Li-ion batteries do not need any type of formatting. Simply load normally and enjoy your device.

  • charge battery for the first time and the best practices for maintaining the life of the new PC laptop battery

    Received my first laptop as a gift today (Pavilion touchsmart 15-n287cl).  You need to know 1.  How long to charge it for the first time or first several times; 2 do you need to unload and reload between each use completely and how long should it take to charge an average before being used again.  3. Since no instructions is a good idea to leave it plugged when you use all the time or the battery should be removed to improve the conservation of life?

    Thank you in advance, it has taken a lot of time to migrate from the desktop.  Want it to be a positive experience.

    Hello

    Modern batteries and chargers are now smarter than you.

    1. you can plugin and immediately to use the machine, the machine will stop charge when the battery is fully charged.

    2. No, we don't need to unload completely between uses, then as above. The recommendation is sometimes we run machine on battery until that up to 10%.

    3. when using AC is a way to protect the unit during the failure of current, all of a sudden, leaving battery on laptop.

    Please read the following article:

    http://BatteryUniversity.com/learn/article/how_to_prolong_lithium_based_batteries

    Kind regards.

  • I am in charge for the first time.  How long should it take?  I check battery during the charge percentage?

    I'm charging my Apple Watch 1 for the first time.  It has been more than 2 hours, and it shows the green lightning when I touch the face.  How long does take to recharge?  Is there a way to check the level of the battery during charging?  How can I tell when it is fully charged?

    You can take a look at this page of the Apple Watch user's Guide. http://help.Apple.com/watch/#/apd2b717523a

  • I bought a new iPhone 6 s more and told me to load for a long time I did let him charge for 25 hours. Is that going to affect my battery life and what happens if I use it immediately?

    I have a new iPhone, and told me to let it load for a long time. I let it charge for 25 hours. This can affect my life of bacteria? And what happens if I don't use the phone immediately?

    Not at all, you can leave it plugged into the power supply, and it won't hurt the battery. However I am not leaving the phone in a State discharged for a long time. That can hurt so when he approaches zero the load soon.

    This user tip can help: when to charge your iPhone or iPad

  • Satellite L650D: how long I leave it on charge for the first time?

    recently bought this computer series Toshiba Satellite L650D and I was wondering how long I leave on the royalties for the first time to power?

    Help, please

    Hello

    My laptop is still connected to the power adapter, so would always charge the battery.
    But usually the battery led turn green if the battery should be fully charged.
    Let the adapter connected until this witness would turn to green or blue (based on the model that you bought for)

  • Charge time for Satellite click Mini L9W - B

    I have another question:

    I noticed that in the first 5 months, the charge time for my click satellite mini was about 6-8 hours for two batteries. Now, it takes much more time. Currently, he is responsible for 13.5 hours and the keyboard battery is not yet completely load (I'll post the exact end time later...).

    There may be a problem or is this normal? I mean that the charging time has almost doubled...

    Thanks in advance

    AFAIK battery reach optimal performance, after some time of use... This means that the battery must be charged and discharged several times to reach the best level... but it also means that the battery charge time would increase...

    So from my point of few, there is no reason to fear that something could be wrong with the battery... you know...

  • Will be more charge time is mode bedside table for iwatch

    Will be more charge time is mode bedside table for iwatch?

    Hello

    In normal operation, the watch cannot be overloaded, and the battery won't suffer harm of regular refills done every day.

    The charge will stop automatically when the watch is fully charged. He leaves also again automatically as and when required due to the use of the current battery.

  • I found iphone locked by owner for a long time in Europe and I need to contact the owner, but I was able to reach him?

    I found iPhone locked by owner for a long time in Europe and I need to contact the owner, but I was able to reach him?

    Return it to the police.

  • TreeSize Professional - using this tool for the first time - need help to run the report

    Using TreeSize Professional for the first time and I need search records to analyze documents containing invalid characters and path names that are too long.  We are moving the content in SharePoiint and SharePoint will not accept path names that are more than 250 characters and invalid characters.

    Does anyone know how to do this research?

    [Moved from the community centre of Participation]

    What is a TreeSize question or a question of SharePoint?

    Try SharePoint forums on the left side of

    https://social.technet.Microsoft.com/forums/en-us/home?category=SharePoint&filter=AllTypes&sort=lastpostdesc

    Don

  • XP key wep changes for new router linksys after the connection. you need to reinstall the WEP every time you start from the top.

    XP key wep changes for new router linksys after the connection. you need to reinstall the WEP every time you start from the top.

    Hello

    Let us perform the steps below and check out them.

    a. click "Start," "Control Panel", then "Add or Remove Programs". In the box "Currently installed programs", find the name of your wireless router. Click on the name of the software, and then click 'remove '. Click 'Yes' when prompted to confirm.
    b. click "Start" then "run". Type "Services.msc" and click "OK". Select 'Wireless Zero Configuration'. Click on 'start '.
    c. click 'Action', 'properties '. In the drop-down menu "Startup Type", click on the arrow and select 'Automatic' to assign the commissioning of automatic Wireless Auto Configuration. Click on 'OK '.
    d. restart your computer.
    e. right click on "Wireless connections" icon Select "View available wireless connections." Click on "change the order of preferred networks. Select the name of your network, and then click "Properties". Erase the old key and enter a new. Click the checkbox next to "Automatically use that key." Click on 'OK '.

    I hope this helps.

    Thank you, and in what concerns:
    Shekhar S - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.
    If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • My card was charged 26,88 books per month for a long time, but I can not use my products from adobe, which is a member ship fee and how can I cancel it?

    My card be charged to 26,88 pounds per month for a long time, but I can't use any adobe products, which is a membership fee and how can I cancel it?

    Your subscription to cloud appears on your account page?

    https://Accounts.adobe.com/ , then click on Plans & products top

    Cancel see answer #1 in https://forums.adobe.com/thread/2023066 - includes a link to Chat from Monday to Friday

  • I try to install LR CC in the clouds of Creativ (10 times) on Mac, and as I propose to iCloud and you logout log in again. The start icon poster for a short time an it's all... need an uninstall of the old LR? Or what to do. Daniel Berne

    I try to install LR CC in the clouds of Creativ (10 times) on Mac, and as I propose to iCloud and you logout log in again. The start icon poster for a short time an it's all... need an uninstall of the old LR? Or what to do. Daniel Berne

    Thank you very much for your help. step by step, I did excatly how you propose. but the success of the moment. When I startet I wish the application to the front of the CC 2015 to up and down... a little more time... and I waited with passion but nothing else happens. my contract with adope is ok and PS the LR old books.

    Best regards

    Daniel

    Sorry for my English

Maybe you are looking for