Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions banner fits various text phrase sizes

  • banner fits various text phrase sizes

    Posted by Bert Brown on August 5, 2008 at 3:08 pm

    I have a banner with text on it, that I will be needing to do many different comps with different phrases on: some a few words, some full long sentences.

    Is there a way to have it so the banner automatically fits the width of the text, either buy enlarging the banner, or moving a matte over it (hiding the part of the banner that’s not needed)?

    ———————————-

    peep my over-the-interweb band, red abbott.
    “we electro-rock over long distances…”

    Bert Brown replied 17 years, 9 months ago 2 Members · 4 Replies
  • 4 Replies
  • Dan Ebberts

    August 5, 2008 at 10:09 pm

    Does the text change with time? If not, you might want to use a script which you could run after you update all the text and have it resize the banners because scripts can now (as of CS3, I believe) access the height and width of a text layer. Shuldn’t be too hard to set up, but it would depend on the specifics of your project.

    Dan

  • Bert Brown

    August 6, 2008 at 7:42 pm

    the text would not change. this would be more for a tool kit for variations that could be passed off to someone who would just be responsible for entering the new text.

    i found this post:
    https://www.aenhancers.com/viewtopic.php?f=6&t=931

    is that how CS3 gets text width and height? or is there another way? what direction should i be looking in?

    ———————————-

    peep my over-the-interweb band, red abbott.
    “we electro-rock over long distances…”

  • Dan Ebberts

    August 6, 2008 at 7:57 pm

    That’s the only way I know of to do it with an expression.

    Since the text is not animated though, if it were me, I’d consider using a script, which has access to the much-more-efficient sourceRectAtTime() method. You would run the script after you updated all the text, or maybe even better, let the script read in the new text from a text file and update the text layers and banner size at the same time.

    Dan

  • Bert Brown

    August 8, 2008 at 3:38 pm

    thanks, dan. i just dont know a thing about scripts. 🙁 and i think even asking someone to run one would complicate this further than it needs to.

    but it does seem that the above expression might do the trick.

    ———————————-

    peep my over-the-interweb band, red abbott.
    “we electro-rock over long distances…”

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy