Skip to main content
gouthamd80954055
Participating Frequently
May 31, 2018 6:53 AM UTC
Answered

How do I make a countdown timer to a specific date using Animate CC html5 canvas

I am Starter to adobe Animate cc. can any one please send me the file or tutorial it will be helpful. Thanks in advance

    This topic is closed to new replies. Start a new post to keep the conversation going.
    kglad
    kgladCorrect answer
    Community Expert
    May 31, 2018 2:38 PM UTC

    yes, use your textfield instance instead of tf

    var specific_d=new Date(2018, 5, 14);

    var d=new Date();

    this.tf.text=Math.round((specific_d.getTime()-d.getTime())/(1000*60*60*24))+" days";

    10 replies

    kglad
    Community Expert
    Community Expert
    May 31, 2018 1:38 PM UTC

    var specific_d=new Date(whatever year, month less 1, date);

    createjs.Ticker.addEventListener("tick"tickF.bind(this));

    function tickF(){

    var d=new Date();

    this.tf.text=Math.round((specific_d.getTime()-d.getTime())/1000)+" seconds";

    }

     

    [moved from ActionScript 3 to Adobe Animate CC - General]

    Translate
    gouthamd80954055
    Participating Frequently
    May 31, 2018 1:58 PM UTC

    Should we need to apply this java code for dynamic text box?

    Translate
    gouthamd80954055
    Participating Frequently
    May 31, 2018 2:07 PM UTC

    I need countdown timer for june 14th 2018. i have tried to insert direct to layer also.

    Please check the file in the below we transfer link.

    WeTransfer

    Translate