Share on facebook
Share on twitter
Share on linkedin
Share on pinterest

Tip 48 – How To Create a Custom Clock in After Effects



Tip Of The Day 048 – How To Create a Custom Clock in After Effects

For more Daily Tips visit https://www.ukramedia.com/tips
Modular Lower Third Kit: https://www.ukramedia.com/shop

LINKS:
Ukramedia Mentoring Group: https://www.facebook.com/groups/ukramedia/
Get Adobe After Effects and CC: https://clk.tradedoubler.com/click?p(264355)a(2900636)g(22804962)url(https://creative.adobe.com/plans?sdid=KKSPF&kw=semoverview&mv=search&s_kwcid=AL!3085!10!13362180955!20541711544&ef_id=V13CaAAABYQcu4O2:20161105023903:s)
Get Adobe CC Trial: https://clk.tradedoubler.com/click?p(264355)a(2900636)g(22804962)url(http://www.adobe.com/creativecloud/catalog/desktop.html)
Get Adobe CC Student: https://clk.tradedoubler.com/click?p(264355)a(2900636)g(22804962)url(https://creative.adobe.com/plans?plan=edu)
Find The Perfect Asset For Your Next Creative Project: https://clk.tradedoubler.com/click?p(264355)a(2900636)g(22804962)url(https://stock.adobe.com/?as_content=fmflp&as_channel=sem&as_campclass=brand&as_campaign=US%7CCPRO%7CStock%7CPURCH%7CAS_Brand%7CGG%7C%7C&as_source=google&as_camptype=acquisition&sdid=KQPCU&s_kwcid=AL!3085!3!147228884620!e!!g!!adobe%20stock&ef_id=V15JXwAAAV06S8xU:20161105024353:s)

LET’S CONNECT:
Facebook: https://www.facebook.com/ukramedia
Sergei’s Facebook Page: https://www.facebook.com/sergeiprokhnevskiy/
Twitter: https://twitter.com/ukramedia
Instagram: https://www.instagram.com/ukramedia/
Pinterest: https://www.pinterest.com/ukramedia/
Linkedin: https://www.linkedin.com/company/ukramedia
YouTube: https://www.youtube.com/c/ukramedia
Mailing Address:
P.O. Box 621
Huntersville, NC 28070

*** MUSIC BY: VLAD SOLOKHA. Vlad is a family friend who is a very talented musician. You can reach out to him by going to his facebook at https://www.facebook.com/vlad.solokha?fref=ts.

Support site by sharing this post

Share on facebook
Facebook
Share on twitter
Twitter
Share on pinterest
Pinterest
Share on linkedin
LinkedIn
Share on reddit
Reddit
Share on tumblr
Tumblr
Share on stumbleupon
StumbleUpon
36 comments
  1. Since the channel only responds to people by saying they should join their cult, here´s the code if you want to add hours:

    slider = effect("Einstellungen für Schieberegler")("Schieberegler")

    sec = slider%60;

    min = Math.floor(slider/60)%60;

    hour = Math.floor(slider/3600);

    function addZero(n) {

    if (n < 10) return "0" + n else return n;

    }

    addZero(hour) + ":" + addZero(min) + ":" + addZero(sec)

  2. With some fixes

    slider=effect("Slider Control")("Slider")

    seconds = Math.floor(slider%60);
    minutes = Math.floor(slider/60)%60;
    hour = Math.floor(slider/3600);

    function addZero(n) {
    if(n < 10) {
    return "0" + n
    } else {

    return n;

    }
    }

    addZero(hour) + ":" + addZero(minutes) + ":" + addZero(seconds)

  3. Большое спасибо вам, Сергей, очень помогло это видео! Открыл для себя новые моменты устройства выражений в АЕ-шке)
    Отдельная благодарочка, что показали не только как достичь конечного результата, но и попутно объяснили, что происходит в процессе написания кода: какие могут быть недочёты и как их исправлять!

  4. Thank you for that cool tutorial. And for those who as me comes from 2021 and receives an error in the code or have issues with seconds, here is the working code for AE CC 2021:
    slider = effect("Slider Control")("Slider");

    seconds = Math.floor(slider%60);

    minutes = Math.floor(slider/60);

    function addZero(n) {

    if(n < 10) {

    return "0" + n

    } else {

    return n;

    }

    }

    if (slider > 0) {

    addZero(minutes) + ":" + addZero(seconds)

    } else {

    "00:00"

    }

  5. slider = effect("Slider Control")("Slider");

    seconds = slider%60;

    minutes = Math.floor(slider/60);

    function addZero(n) {

    if(n < 10) {

    return "0" + n

    } else {

    return n;

    }

    }

    if (slider > 0) {

    addZero(minutes) + ":" + addZero(seconds)

    } else {

    }

  6. Here is the code for AFTER EFFECTS 2019 with seconds rounded up:

    slider = effect("Slider Control")("Slider");

    seconds = Math.floor(slider%60)

    minutes = Math.floor(slider/60);

    function addZero(n) {

    if(n < 10) {

    return "0" + n

    } else {

    return n;

    }

    }

    if (slider > 0) {

    addZero(minutes) + ":" + addZero(seconds)

    } else {

    "00:00"

    }

  7. For anybody who needs a Milisecond version without the slider:

    x=Math.floor(time/60);

    if (x<10)x="0"+x

    y=Math.floor(time%60);

    if (y<10)y="0"+y;

    function addZero(n) {

    if(n < 10) {

    return "0" + n

    } else {

    return n;

    }

    }

    x+ ":"+ y +":"+ addZero(Math.floor(60*(time – Math.floor(time))));

  8. Very nice tutorial bro, if you want to go one step further and add negative numbers, you can use this code:
    slider = effect("Slider Control")("Slider");

    sec = slider%60;

    mins = Math.floor(slider/60);

    function addZero(n){

    if (n<10) return "0" + n;

    else return n;

    }

    if(slider>=0){

    addZero(mins) +":"+addZero(sec);

    }

    else{

    "-"+addZero(Math.abs(mins))+":"+addZero(Math.abs(sec));

    }

    Cheers 😀

  9. slider=effect("Slider Control")("Slider")

    sec=Math.floor(slider%60);
    min=Math.floor(slider/60)%60;
    hour=Math.floor(slider/3600);

    function addZero(n){
    if(n<10){return "0"+n}else{return n}
    }
    addZero(min)+":"+addZero(sec)

Leave a Reply

Your email address will not be published. Required fields are marked *