How to animate box shape to grow along with Typed Text

Is there a way to add a behaviour to a shape (a rectangle) which will grow along with a typed text field?


  • I type a text field and add Behaviour: Type On
  • Underneath text is a coloured rectangle which should expand/grow along with typed alphabets


This is possible to achieve with tedious animation, but any simpler way?


It would be amazing if we could add colours to Text Boxes.

MacBook Pro 16″, macOS 14.1

Posted on Aug 28, 2024 11:04 PM

Reply
Question marked as Top-ranking reply

Posted on Oct 2, 2024 10:18 AM

Here's my project:


https://fcpxtemplates.com/sdm_downloads/typeon-w-bg-fill/

(Duplicate it and save a backup!) You shouldn't have to backdate it (Motion 5.4.7).


This example:


  • Has the In Point (as per your example) set at 1 second.
  • Automatically aligns the rectangle to the text.
  • Automatically adjusts the rectangle Anchor Point according to its current size.
  • Will automatically adapt to any Text Justification (left/center/right — this effect setup doesn't work with multiline texts).
  • Will automatically adapt to any screen position the text is at.
  • Adjusts the text's anchor point according to its height. This is important to make sure that the Rectangle will align (closely) along its vertical center. [Notice the Scale is set to 0.25 - most fonts are ~3/4 up for ascenders and ~1/4 down for descenders. Also Note: no two fonts are exactly the same... ***escpecially*** script fonts which will frequently cross their "bounding box" lines. You can make the Rectangle manually adaptable with Offset parameters (if you plan to publish this to Final Cut.)]


When retiming this effect, only use In and Out Point control on the parent group. You MUST set the End Offset of the Sequence Text to 0 before editing In/Outs. You cannot drag any layer or the group in time. Otherwise *everything* falls apart. Use the technique I outlined above to reset the End Offset for "write on" timing.


You have entered the Everything Matters Zone in Motion (example: the order of Link Behaviors added). (95% of just about every Motion video tutorial has the phrase "it doesn't matter" used about some thing... that is such a poor notion to put into people's heads when it comes to this app.)


Ask questions!! I don't expect you to know, at this point, exactly what I've done. Everything is labelled so you should figure out what supposed to be doing what, but the "why"'s might not be all that obvious.

20 replies

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to animate box shape to grow along with Typed Text

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.