How to create a blinking cursor effect in After Effects - AE Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 ม.ค. 2025

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

  • @nghialuutrong8175
    @nghialuutrong8175 3 ปีที่แล้ว +178

    Next time when you post a video like this, pls write your code in comment ! For everyone who needs:
    var sign = "|";
    var blinkInterval = 15;
    var i = effect("Text")("ADBE Slider Control-0001");
    var on = effect("On/Off")("ADBE Checkbox Control-0001");
    var frames = timeToFrames(time);
    var check = frames / blinkInterval;
    if (on == 1) {
    if (i.valueAtTime(time + thisComp.frameDuration) > i){
    end = sign;
    } else {
    if (Math.floor(check) % 2 == 0) {
    end = sign;
    } else {
    end = " ";
    }
    }
    } else {
    end = " ";
    }
    text.sourceText.substr(0,parseInt(i)) + end;

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

      ^^^Thank you!

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

      Legend.

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

      lmao thank you, who creates a Mediafire link for a ZIP file that contains a few lines of code?!

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

      Thanks!

    • @BOOM_BOOM_BUSH
      @BOOM_BOOM_BUSH 10 หลายเดือนก่อน

      tnx alot brooooooooooooooooo

  • @trinityross9313
    @trinityross9313 3 ปีที่แล้ว +22

    Just a heads up if you can't get the expression working, remember to rename your effect control with capital letters 'On/Off' (if it's lowercase 'On/off' it won't work 😊)

  • @eduardoalcantara9623
    @eduardoalcantara9623 2 ปีที่แล้ว +9

    Hi.
    For those who have the following error in the second expression:
    "Property or method named 'ADBE Text Index End' in Class 'Group' is missing or does not exist. It may have been renamed, moved, deleted, or the name may have been mistyped"
    A fix that I found is to first enter the third expression exactly as it says in 4:14 says, which is
    text("ADBE Text Document").length;
    and then, forget about the second expression. Just use the Pick Whip tool and grab from Start to End.
    That way, it will fill automatically the Start expression field.
    The last step is adding "-1" to that new expression, so you have something like
    whatever.your.expression.is - 1
    It should work now by changing to Index as in further steps, and most importantly, not including break lines in the text field, because it won't work, at least in my case.
    Thanks

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

      tysm omg 😭🫂

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

      tysm omg 😭🫂

  • @balakay612
    @balakay612 ปีที่แล้ว +8

    If you've got a multiline text layer (with hard returns), you may notice the cursor color either breaks or gets offset. Here's what I did to fix that (bear in mind I changed some references, but the concepts remain the same). This goes in the Animator 1 Start property:
    _index = effect("Text")("Slider");
    _newlines = text.sourceText.slice(0, parseInt(_index)).match(/
    /g);
    text.animator("Animator 1").selector("Range Selector 1").end - (1 + (_newlines != null ? _newlines.length : 0));
    (There's probably a cleaner way to reference things here, but this works!)

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

      I love you. Big kiss. I needed this Thanks :)

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

      Thank you so much!
      For those who still get an offset: Make sure you're using hard returns! The code doesn't recognize soft returns

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

    THANK YOU SO MUCH THIS VIDEO IS AWESOME

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

    best type on expression around. it's not about speed like others do, it's the timing of the text and this caters it. just add slider for blinking speed and add the codes at the description and this will be 💯

  • @pauladelrioarteaga4754
    @pauladelrioarteaga4754 3 ปีที่แล้ว +11

    Thank you, was really useful!! Just one thing, I've used it on a composition with the text on more than one row and center alignment, and the blinking course moves the last word to the left as it blinks... any ideas to fix that??

  • @cheezw1z
    @cheezw1z 2 ปีที่แล้ว +7

    I just copied the code you've provided for the cursor color but I couldn't get it to work.
    it says
    Error: property or method named 'ADBE Text Index End' in Class 'Group' is missing or does not exist. It may have been renamed, moved, deleted, or the name may have been mistyped

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

      same problem here

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

      Yea same probleme @Maxwell Ridgeway

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

    Thank you very much, it work's perfectly

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

    how would you change the blinking cursor size? like a square

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

    Awesome tutorial!! Thanks!!

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

    Thank you so much for this awesome tut! Questions: 1) Is there a way to keep the last character (in my case underscore _) a different font weight? 2) Is there a way to have some words in a different font weight? Thanks!

  • @hazelngien5833
    @hazelngien5833 5 วันที่ผ่านมา

    hii may i know how to change the blinking cursor's size, yet keep the text size the same?

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

    Used your tut on my next project - Definately got a sub for this dub! Well done!

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

    Great rig! Thanks for sharing.

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

    Thank you! Super helpful tutorial!

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

    How to change color of the text? Like parcticular words? Cause "Characters" window does not work here.

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

    Using a multiple-line text field for the effect and had a problem where the last word jumped down to the next line and back, fixed it by making the text box a little bit wider, if anybody gets the same problem ;)

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

      Yes you should move the slider as per the length of your text. and check "text.sourceText.substr(0,parseInt(i)) + end;" if the num is 0. But my problem on mac is different. The moment I activate the slider control, it centres the paragraph. It doest let me make it left or right aligned text.

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

      @@johanj701 that sounds weird, I just did a test in AE 2021 with both a paragraph text field and single-line and both worked and I'm able to change the text alignment too.
      Check your anchor points on your text fields when you change the alignment, other than that I can seem to replicate your bug :/

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

    Thanks! Is there a way to avoid the kerning getting affected? I'm not able to control the kerning when the expression is applied.

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

    That was unbelievably helpful! Thanks a lot!

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

    That's incredible! Thank you so much for your help, Max!

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

    Anyone have an idea on how I could change the font-weight and color of JUST the cursor. He shows the color change, but the font-weight seems to be locked to the text it is pacing out to. My font is pretty bold, and I'd like the cursor to be skinny so it doesn't look so much like a character.

  • @Alaa.bencze
    @Alaa.bencze 2 ปีที่แล้ว

    Thank you so much, the expression works well. The only thing is the entire thind is blinking not just the cursor, do you know why?

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

    Thank you for this video!

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

    Thank You so much for this tutorial and script also.. save lots of time ///

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

    Thank u so much sir. 🙏

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

    Characters can't be bold/italic later on. If you want that then everything in the text layer need to adapt that property

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

    Hi there, it's a great tutorial, thank you!
    When I use this effect, the collor of the cursor changes when I use a 'enter' in an alinea. Is there a solution for this?

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

    Thank you, bro!
    what if i want it to blink with different colors every time, like purple-blue-orange-green-yellow in a row?

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

    Thanks for this, great tip. One thing. Is there a way to increase the baseline shift on the cursor? On some fonts, it's lower than it should be. Thanks again

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

    Would've been nice if you put the expression in the actual description so we don't have to click some link that could easily be a virus

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

    Thaank god for you!

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

    Thank you!

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

    Can we use this effect when several fonts in the sentence?

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

    Thanks. Got to learn a new thing today. BTW, if you would have added the typing sound, the video would have been complete. 🙂

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

    Many thanks for this. I have one question. How do I increase the distance between the text and cursor. The way it is executing on my end currently with my chosen font, I would like the cursor to appear at the end of typing to appear little further away from the last text character. Thank you in advance.

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

    Fantástic. Thank you.

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

    How to reduce cursor size ? Its too big

  • @luke.exe.
    @luke.exe. ปีที่แล้ว

    How do I get the effect to not move my entire text box and text while typing it?

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

    Why my project is not blinking like that? 🙂

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

    what should I do if my text is in 2 or 3 lines? the cursor color only works on the first line

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

      For that I would probably create three seperate text lines, each with the effect embeded. So it doesn't interfere with each other etc..

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

      @@MaxwellRidgeway oooh yes! You got it, thanks man!

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

      Change the Start expression in the animator to '2'....
      text.animator("ADBE Text Animator")("ADBE Text Selectors")("ADBE Text Selector")("ADBE Text Index End") - 2;

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

      @@Farns77 no man, that changes the color of the second last character

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

      @@pipogardenal worked for me. But you could always nest the comp, make it black and white then use it as a matte.

  • @600pankaj
    @600pankaj 2 ปีที่แล้ว +1

    Can we add 2 colors in text ??

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

      This is my problem. With any of these expression based typewriter effects I use, it changes my text to one color when I am using 2 different colors. It's really causing me issues.

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

    thanks

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

    why does my cursor start the slider from the centre on the text instead of like yours left to right???

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

    How to make this work for RTL texts? Typing right from left texts for other languages

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

    is there a way to animate by word rather than by character? Tried changing it to animate by word under "animator 1 > range selector 1 > advanced > based on > words" but that didn't work

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

    How can i add checkbox control for on/off cursor when edit text

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

    now what i want too do in make the blinking line at the end bigger like in knd is that a thing?

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

    I want to change the cursor to a different font but it keeps changing the whole text. Help Thanks

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

    Hi, thanks for this, great stuff! Followed your instructions precisely but when my cursor blinks, it shifts the preceding text a few pixels to the left with each blink. Any ideas how to correct this? Thanks!

    • @goddardmakes
      @goddardmakes 4 ปีที่แล้ว +7

      Hi Matt, try changing your paragraph setting on the text layer to left align text. That worked for me.

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

      @@goddardmakes worked for me thanks

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

      @@goddardmakes Thanks for the tip!

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

    The expression doesnt work for me

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

      @@elenarssk2795 try to name the expressions as same as on the video : "Text" "On/Off"

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

      try to name the expressions as same as on the video : "Text" "On/Off"

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

    The link to "EXPRESSIONS" is not working. Kindly share the Expressions here in Comments section...

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

    Is there a way to make it stop blinking at the end when you're finished with the line? Sort of symbolizing that a message has been sent...

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

      best way i found is i copied the text removed the effect on the copy and ended the effect text and started the non effected text thus the line is gone

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

      @@idfkam You can also animated the Checkbox

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

    how to add slider control for cursor blink speed

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

    Why does it only work on the first row?

  • @user-wn3gk5yb4o
    @user-wn3gk5yb4o 3 ปีที่แล้ว +3

    expression doesn't work

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

      try to name the expressions as same as on the video : "Text" "On/Off"

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

    the expression doesn't work on my after effects

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

    I can get the color to work, but then halfway through, it reverts back. Any ideas why that might happen?

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

      same problem. When I paste the end cursor color expression and had it to index it colored the whole thing

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

    How do you make the cursor BIGGER? Like a square????

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

      By changing the first scentence in the expression from var sign = "|"; to var sign = "■";

  • @Shakesphere-x6d
    @Shakesphere-x6d 3 ปีที่แล้ว

    The expression doesn't seem to work. Please help.

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

      Yes Me too!

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

      @@anirbanghosh7869 try to name the expressions as same as on the video : "Text" "On/Off"

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

      try to name the expressions as same as on the video : "Text" "On/Off"

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

    The cursor moves my text

    • @luke.exe.
      @luke.exe. ปีที่แล้ว

      same

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

      @@luke.exe. I think you have to align it to the left

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

    Hey where is the code

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

      right there on the description: www.mediafire.com/file/1wq3q1udzn5n7qb/file

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

    what is this nonsense tutorial

  • @christianmklein
    @christianmklein 6 หลายเดือนก่อน

    Thank you!!

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

    Thank you for this tutorial 👍

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

    the expression doesn't work on my after effects

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

      try to name the expressions as same as on the video : "Text" "On/Off"