Number Counter Animation (with comma) - After Effects Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 มี.ค. 2017
  • The first 1000 people to use the link will get a free trial of Skillshare Premium Membership: skl.sh/moboxgraphics02211
    In this After Effects motion graphic tutorial we are going to be taking a look at how to make an animated number counter / TH-cam view counter with a comma. This technique was learned through Creative Cow and uses After Effects CC scripts to accomplish a number counter with Slider Control.
    CreativeCow.net (script)
    forums.creativecow.net/thread...
    www.MoboxGraphics.com
    × Project Files - / 25337304
    × Additional Project - / 13043411
    × Twitter - / moboxgraphics
    × Instagram - / moboxgraphics
    × Facebook - / moboxgraphics
    × Discord - / discord
    --------------------------------
    Our Gear:
    www.amazon.com/shop/moboxgrap...
    × Keyboard - Logitech G513 - amzn.to/2lNgyjq
    × Mouse - Logitech G402 - amzn.to/2lLYshJ
    × Microphone - Rode NT-USB - amzn.to/2lgudyZ
    × CPU - Intel i7 8700k @ 4.88GHz - amzn.to/2jQbfza
    × CPU Cooler - Corsair H100i v2 - amzn.to/2jOB2Yv
    × Motherboard - ASUS TUF Z370-PRO - amzn.to/2lNlfd3
    × GPU - Gigabyte GTX 1080 - Discontinued
    × RAM - 64GB G.Skill 3200 DDR4
    × Storage - 3 x 1TB Samsung SSD
    × Sound Card - ASUS Xonar DGX HD
    ---------------------------------
    Contributors:
    Mike Ridolfi × @MikeInHD
    Eli Prenten × @Twistereli
    Music: / moboxmusic
    Motion v2 Tool: www.mtmograph.com/motion/
    Adobe After Effects 2017 (AE 2017) is a digital visual effects, motion graphics, and compositing application developed by Adobe Systems and used in the post-production process of film making and television production. Among other things, After Effects can be used for keying, tracking, compositing and animation. It also functions as a very basic non-linear editor, audio editor and media transcoder.
    #AfterEffects #tutorial #numbercounter #TH-cam #mobox

ความคิดเห็น • 249

  • @moboxgraphics
    @moboxgraphics  3 ปีที่แล้ว +1

    We do have an updated version of this video that works in Adobe After Effects 2020 release:
    th-cam.com/video/9p2sSXSFJwg/w-d-xo.html
    Skip to @3:30 in this video to get into the tutorial!

  • @jpi_1990
    @jpi_1990 4 ปีที่แล้ว +114

    If you are getting the same expression on screen instead of the number, here's the fix as of March 2020:
    var num = effect("Slider Control")("Slider");
    num = Comma(num);
    function Comma(number)
    {
    number = '' + Math.round(number);
    if (number.length > 3)
    {
    var mod = number.length % 3;
    var output = (mod > 0 ? (number.substring(0,mod)) : '');
    for (i=0 ; i < Math.floor(number.length / 3); i++)
    {
    if ((mod == 0) && (i == 0))
    output += number.substring(mod+ 3 * i, mod + 3 * i + 3);
    else
    output+= ',' + number.substring(mod + 3 * i, mod + 3 * i + 3);
    }
    return (output);
    }
    else return number;
    }
    [num]

    • @MarioRodriguez-yv2se
      @MarioRodriguez-yv2se 4 ปีที่แล้ว

      That is exactly what was happening for me. Thank you!

    • @TheHonchoofAllSpearheads
      @TheHonchoofAllSpearheads 4 ปีที่แล้ว

      THE ONLY CURE IS YOUR COMMENT! TQVM!

    • @swolefrog
      @swolefrog 3 ปีที่แล้ว

      thank you

    • @veyrongfx1
      @veyrongfx1 3 ปีที่แล้ว +1

      Hi,
      Thank you really helped alot. Cheers! worked on CC 2021

    • @jpi_1990
      @jpi_1990 3 ปีที่แล้ว +1

      @@veyrongfx1 my pleasure helping everyone out!

  • @maxmurray9613
    @maxmurray9613 5 ปีที่แล้ว +2

    Thank you for being so clear and quick to the point! It's so hard to find tutorials where people don't roam on and on about something without getting into the meat of it, Thanks a ton!

  • @pixelandbracket
    @pixelandbracket 7 ปีที่แล้ว

    Perfect! Slider control on the text was exactly what I needed for a project I'm working on 👊

  • @shadrachandtheboys5626
    @shadrachandtheboys5626 3 ปีที่แล้ว +1

    Tried to figure out for so long how to centre the text and you're the only tutorial who showed that it's to do with adjusting the paragraph settings! Thank you!

  • @JoshuaCarvalho1
    @JoshuaCarvalho1 6 ปีที่แล้ว

    Thank you for making this video! I have been looking everywhere on YT and Google for a couple hours to find a tutorial for this function on After Effects. So glad to finally find your video

  • @tiaan_va
    @tiaan_va 3 ปีที่แล้ว +28

    For whoever might want to use this in CC2020, you will get some syntax errors even with the project set to use legacy code. So use the following to get it to work:
    var num = effect("Slider Control")("Slider");
    numOut = Comma(num);
    [numOut];
    function Comma(number)
    {
    number = "" + Math.round(number);
    if (number.length > 3)
    {
    var mod = number.length % 3;
    var output = (mod > 0 ? (number.substring(0,mod)) : "");
    for (i=0 ; i < Math.floor(number.length / 3); i++)
    {
    if ((mod == 0) && (i == 0))
    output += number.substring(mod+ 3 * i, mod + 3 * i + 3);
    else
    output+= "," + number.substring(mod + 3 * i, mod + 3 * i + 3);
    }
    return (output);
    }
    else return number;
    }

  • @nongovmedia
    @nongovmedia 4 ปีที่แล้ว +9

    please where do i add the expression? it messes up everything when i paste it into the expression column

  • @itsjoshuashawn
    @itsjoshuashawn 4 ปีที่แล้ว

    Great tutorial, I definitely appreciate the quick "to the point" nature. Keep up the great work.

  • @myonez91
    @myonez91 3 ปีที่แล้ว +16

    Hi all! For those of you who had the Syntax Error - here is the solution. I had the same issue but it did't work even after I fixed all the "" symbols. I replaced the symbols and put the [num] to the end of the expression and then it started to work.
    var num = effect("Slider Control")("Slider")
    num = Comma(num);
    function Comma(number)
    {
    number = "" + Math.round(number);
    if (number.length > 3)
    {
    var mod = number.length % 3;
    var output = (mod > 0 ? (number.substring(0,mod)) : "");
    for (i=0 ; i < Math.floor(number.length / 3); i++)
    {
    if ((mod == 0) && (i == 0))
    output += number.substring(mod+ 3 * i, mod + 3 * i + 3);
    else
    output+= "," + number.substring(mod + 3 * i, mod + 3 * i + 3);
    }
    return (output);
    }
    else return number;
    }
    [num]

  • @FLOWTUTS
    @FLOWTUTS 7 ปีที่แล้ว +1

    your style is awesome keep it up ^^

  • @seafffoam
    @seafffoam 5 ปีที่แล้ว +1

    Thank you so much!! :) Super helpful and simple. Yay.

  • @SiTunyol
    @SiTunyol 7 ปีที่แล้ว +3

    thanks for your help,, i can make it for my short movie about youtube..

  • @AM1media
    @AM1media 6 ปีที่แล้ว

    Excellent. Highly appreciated.

  • @wolve1at
    @wolve1at 4 ปีที่แล้ว

    Wow this worked like magic, I have almost ZERO experience in After Effects. Thank YOU!

  • @adityatrivedi4612
    @adityatrivedi4612 4 ปีที่แล้ว

    Wonderful..!! You are making us learn 3 things in Single Video..! Much Appreciated 👌

  • @GiulioMoura
    @GiulioMoura 7 ปีที่แล้ว

    Now that is one thing I was crazy to really KNOW how to do it..
    Expressions.. Something I still have to dive into it..
    Thanks a lot for the tut!

  • @somehannahperson
    @somehannahperson 4 ปีที่แล้ว +5

    When I copy paste the expression it shows up in the textfield on stage...

  • @mikidigital9430
    @mikidigital9430 6 ปีที่แล้ว

    exactly what I needed OMG!!! THank you

  • @Reiko027
    @Reiko027 6 ปีที่แล้ว +42

    En español:
    var num = effect("Control del deslizador")("Deslizador")
    num = Comma(num);
    [num]
    function Comma(number)
    {
    number = '' + Math.round(number);
    if (number.length > 3)
    {
    var mod = number.length % 3;
    var output = (mod > 0 ? (number.substring(0,mod)) : '');
    for (i=0 ; i < Math.floor(number.length / 3); i++)
    {
    if ((mod == 0) && (i == 0))
    output += number.substring(mod+ 3 * i, mod + 3 * i + 3);
    else
    output+= ',' + number.substring(mod + 3 * i, mod + 3 * i + 3);
    }
    return (output);
    }
    else return number;
    }

    • @Eltuerka77
      @Eltuerka77 4 ปีที่แล้ว

      Gracias!

    • @abeldesign4865
      @abeldesign4865 4 ปีที่แล้ว +1

      ME SALE ERROR :(

    • @Monetanai
      @Monetanai 4 ปีที่แล้ว

      @@abeldesign4865 seguro porque nombraste el layer del deslizador. Vuelve a vincularlo y lo que te saga lo pones delante del var num (ejemplo, mi layer se llama "Controlador" y el código de vinculación aparece thisComp.layer("Controlador").effect("Control del deslizador texto")("Deslizador"), todo eso lo pones en el primer renglón y listo)

    • @danielcruz6911
      @danielcruz6911 4 ปีที่แล้ว

      Mil gracias!!!!!

  • @LionElAtonArt
    @LionElAtonArt 4 ปีที่แล้ว

    Thank you my friend. You are a gentleman, and a scholar.

  • @Shay4383
    @Shay4383 5 ปีที่แล้ว +1

    Hey, thanks for that :)
    But I have some annoying problem, after adding the script, it adds a little space after the comma and I just can't figure how to get rid of it...

  • @Madridavid100
    @Madridavid100 6 ปีที่แล้ว

    Thank you so much, it was really helpful

  • @paulafuchs3666
    @paulafuchs3666 5 ปีที่แล้ว

    You saved me life!! Thank you!

  • @johnlesanche6221
    @johnlesanche6221 5 ปีที่แล้ว

    Very helpful, thanks!

  • @nicktomylko6692
    @nicktomylko6692 4 ปีที่แล้ว +37

    For it to work in CC2019 not Legacy ExtendScript:
    Function must be BEFORE the result!
    ===================
    var num = effect("Slider Control")("Slider")
    function Comma(number)
    {
    number = '' + Math.round(number);
    if (number.length > 3)
    {
    var mod = number.length % 3;
    var output = (mod > 0 ? (number.substring(0,mod)) : '');
    for (i=0 ; i < Math.floor(number.length / 3); i++)
    {
    if ((mod == 0) && (i == 0))
    output += number.substring(mod+ 3 * i, mod + 3 * i + 3);
    else
    output+= ',' + number.substring(mod + 3 * i, mod + 3 * i + 3);
    }
    return (output);
    }
    else return number;
    }
    num = Comma(num);
    [num]

    • @ChrisOliver4307
      @ChrisOliver4307 4 ปีที่แล้ว +2

      You're a life saver

    • @kurtdewittphoto
      @kurtdewittphoto 4 ปีที่แล้ว

      THANK YOU!

    • @crokey_animation
      @crokey_animation 4 ปีที่แล้ว

      Cheers mate

    • @ZattalovOffishal
      @ZattalovOffishal 4 ปีที่แล้ว

      what do you mean by "Function must be BEFORE the result!" ???? HELP PLEEEEASE

    • @nicktomylko6692
      @nicktomylko6692 4 ปีที่แล้ว

      @@ZattalovOffishal In JavaScript expression execution line by line. So, function should be higher, in first lines. Legacy ExtendScript expression reads as full docs, with all lines.
      Therefore in Legacy ExtendScript it doesn't matter where the function is.

  • @SimonSunda
    @SimonSunda 5 ปีที่แล้ว

    THANK YOU VERY MUCH!
    it works :)

  • @Keepingitbalanced
    @Keepingitbalanced 3 ปีที่แล้ว +2

    Thanks so much for this! Struggling to find how to add +"Kg" or +"night" ect to the end is that possible?

  • @Dexter8911
    @Dexter8911 5 ปีที่แล้ว

    Thank you, how do I make the motion effect at the beginning of the video?

  • @dg1090174007
    @dg1090174007 6 ปีที่แล้ว

    Thanks! Awesome!

  • @gamingexes4075
    @gamingexes4075 6 ปีที่แล้ว

    Hi, is it possible, for example, to add an image INSTEAD of a character, next to the number? Lets say that instead of a "$" or "%" i want to add the image of a little coin, so when the number increases and moves by its increasement, the coin next to it will move accordingly. Thanks a lot in advance

  • @elliot_ps420
    @elliot_ps420 4 ปีที่แล้ว

    it doesnt allow me to do expressions for some reason, it is just gray, i click alt and it doesnt work

  • @cappeymeinade5589
    @cappeymeinade5589 4 ปีที่แล้ว +2

    Hello with AE 2020 not working this line : var num = effect("Slider Control")("Slider") a idea please ? Thanks

  • @SofokeBeats
    @SofokeBeats 5 ปีที่แล้ว

    how do you make it look like you in the youtube page doe? and also while playing the video?

  • @vincentbelanger8288
    @vincentbelanger8288 3 ปีที่แล้ว

    Very good explanation thanks !

  • @jimmierustle1441
    @jimmierustle1441 7 ปีที่แล้ว +3

    hey bro. awesome tutorial, subscribed.
    i have a question though. how do I replace the comma with a space? thank you!

  • @samlipmanstern
    @samlipmanstern 7 ปีที่แล้ว

    SO DARNED HELPFUL!!! THANK YOU!!!!! :)

  • @suunapeter4797
    @suunapeter4797 7 ปีที่แล้ว

    Thank you
    U saved a day here

  • @BradAllenWilde
    @BradAllenWilde 6 ปีที่แล้ว +1

    Amazing. I was about to get all mad about it not going over a million but that multiplying trick works great!

    • @rice2299
      @rice2299 4 ปีที่แล้ว

      Agh, when I tried putting 100,000 it did the counting thing up to 100 but then suddenly jumped to 100,000. I agree, it's amazing!

  • @maryamhassan132
    @maryamhassan132 4 ปีที่แล้ว

    I always learn come thing knew from this channel thank you so much ^_^

  • @inieseung
    @inieseung 6 ปีที่แล้ว

    great! helpful! thnks!

  • @PhilippTimokhin
    @PhilippTimokhin 6 ปีที่แล้ว +6

    Great video! Thank you! How did you make your countdown be with motion blur? I’ve enabled motion blur on my text layer as well as motion blur for the entire comp, but still not getting that slick motion blur! Please help :)

    • @jpmillz
      @jpmillz 5 ปีที่แล้ว +7

      "Effects & Presets" -> "Pixel Motion Blur"

  • @diegobarrios1090
    @diegobarrios1090 5 ปีที่แล้ว

    thanks man!!

  • @evee6974
    @evee6974 5 ปีที่แล้ว +1

    I'm getting an expression error. followed everything perfectly. adobe cc 2018

  • @NadunDissanayake
    @NadunDissanayake 7 ปีที่แล้ว

    Thank you very much. This saved my day/

  • @monstercolorfunco4391
    @monstercolorfunco4391 7 หลายเดือนก่อน

    major thumbs up if you upload a counter with different fonts or even just one font, as a green screen or chroma able screen.

  • @unrealengineruseng9583
    @unrealengineruseng9583 2 ปีที่แล้ว

    Thank you man !

  • @AndreaAvellinoVideo
    @AndreaAvellinoVideo 5 ปีที่แล้ว +2

    Thank you for this great tutorial, may I ask you, would be possible to replace the comma with a dot? I don't know where to change the expression.

    • @Nina-hw6zn
      @Nina-hw6zn 4 ปีที่แล้ว +3

      Change the elseoutput from "," to "."
      var num = effect("Slider Control")("Slider")
      num = Comma(num);
      [num]
      function Comma(number)
      {
      number = '' + Math.round(number);
      if (number.length > 3)
      {
      var mod = number.length % 3;
      var output = (mod > 0 ? (number.substring(0,mod)) : '');
      for (i=0 ; i < Math.floor(number.length / 3); i++)
      {
      if ((mod == 0) && (i == 0))
      output += number.substring(mod+ 3 * i, mod + 3 * i + 3);
      else
      output+= '.' + number.substring(mod + 3 * i, mod + 3 * i + 3);
      }
      return (output);
      }
      else return number;
      }

  • @pixelcube73
    @pixelcube73 4 ปีที่แล้ว

    thank you very much!

  • @kamelbouknadel8106
    @kamelbouknadel8106 6 ปีที่แล้ว +1

    Coup/pasted the code but always sends me an error message :/ Can it be because I'm using a French keyboard (sorry guys, not an expert at AE)

  • @shashikiran7173
    @shashikiran7173 3 ปีที่แล้ว

    exactly what I was looking for

  • @yungloaf
    @yungloaf 3 ปีที่แล้ว

    life savers. thank youuuuuu

  • @GDoggProductions
    @GDoggProductions 7 ปีที่แล้ว

    Great tutorial XD! i have one question, do you have a tutorial for your zooming in effect that you do from 0:07 to 0:12

  • @monikasahni5602
    @monikasahni5602 4 ปีที่แล้ว

    thank you so much sir

  • @pixelandbracket
    @pixelandbracket 7 ปีที่แล้ว +5

    And here I am again, I guess I should have waited for the Math.round() expression haha

  • @stickapot3623
    @stickapot3623 4 ปีที่แล้ว

    thank u!!

  • @isl270
    @isl270 5 ปีที่แล้ว

    cant thank you enough

  • @TheTechGirl007
    @TheTechGirl007 4 ปีที่แล้ว

    Wow love this I am going to use this to count to 15000 subscribers video. Soo that was a great tutorial.

  • @digito2300
    @digito2300 4 ปีที่แล้ว

    What if you want to add two decimal at the end for currency?

  • @kubilaydall6007
    @kubilaydall6007 4 ปีที่แล้ว

    thank u bro

  • @NowyKurs
    @NowyKurs 5 ปีที่แล้ว

    Any idea how to achieve this effect with Resolve?

  • @BoostedState
    @BoostedState 7 ปีที่แล้ว

    that voice crack at 3:17 tho lolXD thanks for the help bro

  • @ahmadsy4421
    @ahmadsy4421 5 ปีที่แล้ว

    Thanks

  • @user-ph7qm4vr3q
    @user-ph7qm4vr3q 4 ปีที่แล้ว

    How can you hold the shaking when the number goes down?

  • @zapre2284
    @zapre2284 ปีที่แล้ว

    Any idea where to find slider control or effects and pre-sets ?

  • @krahzi-8647
    @krahzi-8647 4 ปีที่แล้ว +2

    спасибо

  • @oscarmoreno2350
    @oscarmoreno2350 4 ปีที่แล้ว

    ¡Gracias!

  • @ATGBrewing
    @ATGBrewing 5 ปีที่แล้ว

    How do you / would you add a numerical value to before the counter? Specifically a pound (£) sign?

    • @kreative_kam
      @kreative_kam 5 ปีที่แล้ว

      AGAINST THE GRAIN if you add
      “£” +
      Before the expression it will appear

  • @bondell1840
    @bondell1840 4 ปีที่แล้ว

    can you change comma to dot ?

  • @amistyburner
    @amistyburner ปีที่แล้ว +1

    Please can you do it on phone for us to see because I didn’t see anything on the computer

  • @nappon-an8359
    @nappon-an8359 6 ปีที่แล้ว +2

    Hey Guys! Thanks for the tuts though I have a question. What can I edit in expression to the numbers count up to 2 million? Hope you answer my question asap. Thanks a lot and more power! ^^

    • @pcholtz
      @pcholtz 4 ปีที่แล้ว

      anyone ever figure this out?

    • @milheiroveen2204
      @milheiroveen2204 3 ปีที่แล้ว

      @@pcholtz well what I did because i could not find a answer, I repeat the countdown, but masked the first number...

  • @HaryosoRiyadhi
    @HaryosoRiyadhi 4 ปีที่แล้ว +2

    what if i want to add a currency in front of it?
    i usually use "$" + effect(.....and so on... and so on...)

    • @xaidet
      @xaidet 4 ปีที่แล้ว

      How he did counting growing left to write?? how align?

  • @aftermotion7902
    @aftermotion7902 7 ปีที่แล้ว +1

    I looked for this like a two months ago and nowhere it was explained so clear like here :/

  • @vincentchug
    @vincentchug 5 ปีที่แล้ว +28

    var num = effect("Slider Control")("Slider")
    num = Comma(num);
    [num]
    function Comma(number)
    {
    number = '' + Math.round(number);
    if (number.length > 3)
    {
    var mod = number.length % 3;
    var output = (mod > 0 ? (number.substring(0,mod)) : '');
    for (i=0 ; i < Math.floor(number.length / 3); i++)
    {
    if ((mod == 0) && (i == 0))
    output += number.substring(mod+ 3 * i, mod + 3 * i + 3);
    else
    output+= ',' + number.substring(mod + 3 * i, mod + 3 * i + 3);
    }
    return (output);
    }
    else return number;
    }

  •  4 ปีที่แล้ว

    awesome!! really helped but how can I start with 000.000 instead of just 0?

  • @3nel945
    @3nel945 5 ปีที่แล้ว +1

    template please ?

  • @technamite9886
    @technamite9886 7 ปีที่แล้ว +3

    Hey man it'd be gr8 if u could do that YT page thing it was epic

    • @technamite9886
      @technamite9886 7 ปีที่แล้ว

      +Zvi Moss will check it out but i made something myself too 😊

  • @Mylksix
    @Mylksix 3 ปีที่แล้ว +4

    The code on the website is missing some quotation marks, causing some 'unterminated string constant' syntax errors. If you're getting those, swap out lines 7 and 11 with ~number = "" + Math.round(number);~ and ~var output = (mod > 0 ? (number.substring(0,mod)) : "");~ . Remove the ~.
    Also, since this Tutorial is a bit outdated, you're going to have to go to Project Settings --> Expressions --> and set it to 'Legacy ExtendScript' to get things working.

    • @SebDJ
      @SebDJ 2 ปีที่แล้ว

      Yep, I can't get this to work in 2022, even with swapping out lines 7 and 11 with: number = "" + Math.round(number);~ and ~var output = (mod > 0 ? (number.substring(0,mod)) : "");

    • @Xandertank2010
      @Xandertank2010 ปีที่แล้ว

      @@SebDJ me neither, i´m tired of looking for how to put the damn comma. Did u got it fixed?

    • @SebDJ
      @SebDJ ปีที่แล้ว

      @@Xandertank2010 I've had 8 beers tonight, so I have absolutely no idea 😂. I'll try and figure this out tomorrow!

  • @timomaxim7425
    @timomaxim7425 2 ปีที่แล้ว

    How can you add a fitting Sound effect ?

  • @meepster554
    @meepster554 7 ปีที่แล้ว

    I gotta question, how would I do a timer? Like from 20:00 to 0.

    • @moboxgraphics
      @moboxgraphics  7 ปีที่แล้ว

      I think there is a built in function for that actually. Look up timer or something like that in effects and presets

  • @slimmyTM
    @slimmyTM 7 ปีที่แล้ว +3

    Can u do how to crate that YT page and chrome browser

    • @phendan
      @phendan 7 ปีที่แล้ว +1

      I'd like a tutorial on that as well. Especially the 3D movement.

    • @meepster554
      @meepster554 7 ปีที่แล้ว

      slimmy ™ He uses illustrator and recreates it from a picture.

    • @kaducamilo2012
      @kaducamilo2012 7 ปีที่แล้ว +1

      He have 2 monitors I guess

    • @slimmyTM
      @slimmyTM 7 ปีที่แล้ว

      Zvi Moss thanks! i can use it right?

    • @slimmyTM
      @slimmyTM 7 ปีที่แล้ว

      +Zvi Moss ill credit you if i use it on something on my channel ;)

  • @jmma1138
    @jmma1138 5 ปีที่แล้ว

    If I were to add two decimals to the counter, how should I modify this expression?

    • @TarunGameArts
      @TarunGameArts 4 ปีที่แล้ว

      Put this in expression
      var num = effect("Slider Control")("Slider")
      num = Comma(num);
      [num]
      function Comma(number)
      {
      number = '' + Math.round(number);
      if (number.length > 5)
      {
      var mod = number.length % 5;
      var output = (mod > 0 ? (number.substring(0,mod)) : '');
      for (i=0 ; i < Math.floor(number.length / 3); i++)
      {
      if ((mod == 0) && (i == 0))
      output += number.substring(mod+ 3 * i, mod + 3 * i + 3);
      else
      output+= '.' + number.substring(mod + 3 * i, mod + 3 * i + 3);
      }
      return (output);
      }
      else return number;
      }

  • @KriptexHD
    @KriptexHD 7 ปีที่แล้ว

    Is there any way to add a dollar sign in the front of the text that stays in front of the numbers all the way from 0 to 50,000?

    • @moboxgraphics
      @moboxgraphics  7 ปีที่แล้ว

      "$" + (effect("Slider Control")("Slider").value.toFixed(2))

    • @timdurning
      @timdurning 3 ปีที่แล้ว +1

      I was able to get it by adding "$" + after the "return" on line 19 like this: return "$" + (output);

    • @DeadlyHeadley
      @DeadlyHeadley 2 ปีที่แล้ว

      @@timdurning Thank you for this! 🙌🏼

  • @markring5483
    @markring5483 7 ปีที่แล้ว

    Is there a way to add a dollar symbol on the front end of the counting number with the commas?

    • @moboxgraphics
      @moboxgraphics  7 ปีที่แล้ว +1

      "$" + (effect("Slider Control")("Slider").value.toFixed(2))

    • @noah0189
      @noah0189 7 ปีที่แล้ว +1

      When I add this expression, it loses the comma and adds two decimal points. How can I make it go to an even, round number with a dollar sign and no decimals? For instance $15,000. Thanks.

    • @timdurning
      @timdurning 3 ปีที่แล้ว

      I was able to get it by adding "$" + after the "return" on line 19 like this: return "$" + (output);

  • @stressbuster-nocopyrightso1553
    @stressbuster-nocopyrightso1553 4 ปีที่แล้ว

    Help!!!
    num= effect("slider control")("slider)
    num1= effect("slider control 2")("slider)
    num + "~" +num1
    My result will be: 1253 ~ 273753
    My problem Is I need To add commas to them !
    I need help

  • @mirazsu
    @mirazsu 7 ปีที่แล้ว

    Loving your intro. I wish I knew how to do the effect you did on the B letter. Any minor tips ?

    • @moboxgraphics
      @moboxgraphics  7 ปีที่แล้ว

      Check this tutorial
      th-cam.com/video/8ByeGByWUAA/w-d-xo.html

    • @mirazsu
      @mirazsu 7 ปีที่แล้ว

      Thanks buddy, appreciate it. keep up the good work

  • @TechnicalBaksi1
    @TechnicalBaksi1 6 ปีที่แล้ว

    Sir Please Give Me this video after effect Template

  • @GopalShivakoti
    @GopalShivakoti 3 ปีที่แล้ว +5

    Working code:
    var num = effect("Slider Control")("Slider");
    num = Comma(num);
    function Comma(number)
    {
    number = '' + Math.round(number);
    if (number.length > 3)
    {
    var mod = number.length % 3;
    var output = (mod > 0 ? (number.substring(0,mod)) : '');
    for (i=0 ; i < Math.floor(number.length / 3); i++)
    {
    if ((mod == 0) && (i == 0))
    output += number.substring(mod+ 3 * i, mod + 3 * i + 3);
    else
    output+= ',' + number.substring(mod + 3 * i, mod + 3 * i + 3);
    }
    return (output);
    }
    else return number;
    }
    [num]

    • @kolecava
      @kolecava 3 ปีที่แล้ว

      Cheers mate!!

    • @1211hh
      @1211hh ปีที่แล้ว

      Thanx

  • @NickHHs
    @NickHHs 5 ปีที่แล้ว +5

    Here you go. Result - $10,000.00 edit if needed.
    s = "" + "$"+effect("Slider Control")("Slider").value.toFixed(2)
    if (s.length > 6){
    s.substr(0, s.length -6) + "," + s.substr(-6);
    }else{
    s
    }

  • @mysteriumxarxes3990
    @mysteriumxarxes3990 2 ปีที่แล้ว

    what if I want commas and zeros before

  • @bipedal
    @bipedal 6 ปีที่แล้ว

    How did you get the counter to blur in that way?

    • @moboxgraphics
      @moboxgraphics  6 ปีที่แล้ว

      Hi Caleb, simply apply motion blur setting for the layers and composition.
      This video may help:
      th-cam.com/video/9p2sSXSFJwg/w-d-xo.html

    • @bipedal
      @bipedal 6 ปีที่แล้ว

      Yeahh I never got as intense of an effect as this video seems to show. Thanks for the quick reply.

  • @RoksanaGantova
    @RoksanaGantova 3 ปีที่แล้ว +1

    Error SyntaxError: Invalid or unexpected token not work for me ... last version adobe efect

  • @nataliehobbons3173
    @nataliehobbons3173 4 ปีที่แล้ว +2

    How do you add an "$" at the start?

    • @mch5392
      @mch5392 4 ปีที่แล้ว +3

      on the 2nd row after num = add this: "$"+(space)
      so it looks like this:
      var num = effect("Slider Control")("Slider")
      num = "$"+ Comma(num);
      [num]

    • @Dargolan
      @Dargolan 2 ปีที่แล้ว

      @@mch5392 Thank you!

  • @SofokeBeats
    @SofokeBeats 5 ปีที่แล้ว +1

    everytime I copy the code into the source text it just shows the actual code on the screen

    • @BoxterMusic
      @BoxterMusic 5 ปีที่แล้ว

      Me too

    • @SofokeBeats
      @SofokeBeats 5 ปีที่แล้ว

      Read the comment by @clipreply to fix it

  • @paulafuchs3666
    @paulafuchs3666 5 ปีที่แล้ว

    What if I wanted to change the comma for a point?

    • @guilhermeantunes4018
      @guilhermeantunes4018 5 ปีที่แล้ว

      var num = effect("Slider Control")("Slider")
      num = Comma(num);
      [num]
      function Comma(number)
      {
      number = '' + Math.round(number);
      if (number.length > 3)
      {
      var mod = number.length % 3;
      var output = (mod > 0 ? (number.substring(0,mod)) : '');
      for (i=0 ; i < Math.floor(number.length / 3); i++)
      {
      if ((mod == 0) && (i == 0))
      output += number.substring(mod+ 3 * i, mod + 3 * i + 3);
      else
      output+= ',' + number.substring(mod + 3 * i, mod + 3 * i + 3);
      }
      return (output);
      }
      else return number;
      }

  • @SebDJ
    @SebDJ 2 ปีที่แล้ว

    Any idea on how to add a £ symbol before the counter?

    • @SebDJ
      @SebDJ 2 ปีที่แล้ว

      numDecimals = 2;
      commas = true;
      dollarSign = true;
      dur = 4;
      s = effect("Slider Control")("Slider").value.toFixed(0);
      prefix = "";
      if (s[0] == "-"){
      prefix = "-";
      s = s.substr(1);
      }
      if(dollarSign) prefix += "£";
      if (commas){
      decimals = "";
      if (numDecimals > 2){
      decimals = s.substr(-(numDecimals + 1));
      s = s.substr(0,s.length - (numDecimals + 1));
      }
      outStr = s.substr(-s.length, (s.length-1)%3 +1);
      for (i = Math.floor((s.length-1)/3); i > 0; i--){
      outStr += "," + s.substr(-i*3,3);
      }
      prefix + outStr + decimals;
      }else{
      prefix + s;
      }

  • @ropcoproducciones
    @ropcoproducciones 5 ปีที่แล้ว

    Hi, how do I make a point instead of the comma?

    • @guilhermeantunes4018
      @guilhermeantunes4018 5 ปีที่แล้ว +1

      var num = effect("Slider Control")("Slider")
      num = Comma(num);
      [num]
      function Comma(number)
      {
      number = '' + Math.round(number);
      if (number.length > 3)
      {
      var mod = number.length % 3;
      var output = (mod > 0 ? (number.substring(0,mod)) : '');
      for (i=0 ; i < Math.floor(number.length / 3); i++)
      {
      if ((mod == 0) && (i == 0))
      output += number.substring(mod+ 3 * i, mod + 3 * i + 3);
      else
      output+= ',' + number.substring(mod + 3 * i, mod + 3 * i + 3);
      }
      return (output);
      }
      else return number;
      }

    • @vizualedit0r481
      @vizualedit0r481 5 ปีที่แล้ว

      @@guilhermeantunes4018 Thank you so much for this!

  • @roboboro
    @roboboro ปีที่แล้ว

    in the link doesnt appear the script.

  • @ELPAT30N
    @ELPAT30N 4 ปีที่แล้ว +9

    the code is wrong buddy, i'm using CC2020, the correct code is:
    num = value;
    function addCommas(x) {
    return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
    }
    addCommas(num)

    • @sujungshin9480
      @sujungshin9480 3 ปีที่แล้ว

      thanx for the right expresssion for 2020cc, though with your expression my numbers aren't going up or down. Could you please help me with this..

    • @jeniguerra2037
      @jeniguerra2037 3 ปีที่แล้ว

      but should I change the whole expression or just some lines?

  • @rachinc
    @rachinc ปีที่แล้ว

    i went to that link, there is no expression on that link