Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions expression change word into numbers

  • expression change word into numbers

    Posted by Ed Home on May 20, 2016 at 10:50 am

    Hi everyone,

    I made a word, turning into a number (3 weeks -> 12,600.000)
    I used an expression found on this forum (pasted blow my question).

    After the expression starts working (second marker) the word first changes to characters and at the third marker it finally changes to numbers.
    My question is, when it starts changing (at the seconde marker) I like to have numbers instead of characters. Is this possible in this expression:

    n = 0;
    if (marker.numKeys > 0){
    n = marker.nearestKey(time).index;
    if (marker.key(n).time > time){
    n–;
    }
    }

    switch (n) {
    case 1:
    “1234”//change this to change the initial word
    break;

    case 2:

    numRows = 1;
    numChars = 4;
    holdFrames = 5;

    seed = Math.floor(time/(holdFrames*thisComp.frameDuration));
    seedRandom(seed,true);

    s = “”;
    j = 0;
    while(j < numRows){
    k = 0;
    while (k < numChars){
    c = Math.floor(random(48,57));
    s += String.fromCharCode(c);
    k += 1;
    }
    s += “”;
    j += 1;
    }
    s

    break;
    default:
    value
    }

    Hope somebody can help me 🙂
    Thx,
    Edith

    Ed Home replied 9 years, 11 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

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