FORUMS: list search recent posts

expression change word into numbers

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Ed Home
expression change word into numbers
on May 20, 2016 at 10:50:28 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


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]