-
How do you create an expression?
I’ve been looking up how to do a clock expression (like in this link)
https://www.motionscript.com/design-guide/up-down-clock.htmland I’m glad such a thorough explanation is provided, but I don’t know where to put it! I have adobe after effects cs3 professional. I vaguely only know that to put this expression in your video you have to have a .jsx file, it has to be in UTF-8 encoding, and something about javascript. But when I go to file>scripts>open script editor nothing happens, and when I copy and paste this copy and paste code from the link in this post:
rate = -2;
clockStart = 3604.999;function padZero(n){
if (n < 10) return “0” + n else return “” + n
}clockTime = clockStart + rate*(time – inPoint);
if (clockTime < 0){
sign = “-“;
clockTime = -clockTime;
}else{
sign = “”;
}t = Math.floor(clockTime);
hr = Math.floor(t/3600);
min = Math.floor((t%3600)/60);
sec = Math.floor(t%60);
ms = clockTime.toFixed(3).substr(-3);
sign + padZero(hr) + “:” + padZero(min) + “:” + padZero(sec) + “.” + msWhen I paste that into a notepad and then encode it to utf-8 and change the extension to .jsx and go to file>scripts>run script file and click my jsx file it says Unable to execute script at line 8. time is undefined. On the eighth line I see this:
clockTime = clockStart + rate*(time – inPoint); and I’m not sure what to change, clockTime or time? And I just don’t know how to insert this javascript into aE. Thanks