Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Adding a symbol to this expression

  • Adding a symbol to this expression

    Posted by Simon Jones on November 19, 2019 at 2:53 pm

    I’m using the following expression to generate values for counters used within a game (thanks to Dan Ebbert and Walter Soyka) :

    frames = 15;
    clockStart = 1;
    rate = (1/thisComp.frameDuration) / frames;
    clockTime = clockStart + rate*(time – inPoint);
    Math.floor(clockTime);

    The question I have is that I wish to add a £ or $ symbol in fornt of the generated number. Anyone know how i’d do that?

    Cheers

    Simon

    it’s all about the X and the Y

    Cassius Marques replied 6 years, 6 months ago 2 Members · 1 Reply
  • 1 Reply
  • Cassius Marques

    November 19, 2019 at 4:52 pm

    If its a field that accepts strings you just need to add (“any string”) + before the result (which is Math.floor…)

    such as
    frames = 15;
    clockStart = 1;
    rate = (1/thisComp.frameDuration) / frames;
    clockTime = clockStart + rate*(time - inPoint);
    ("$")+Math.floor(clockTime);

    Cassius Marques
    http://www.zapfilmes.com

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