Activity › Forums › Adobe After Effects Expressions › importing numbered frames into AE?
-
importing numbered frames into AE?
Dan Ebberts replied 13 years, 5 months ago 2 Members · 16 Replies
-
Ben Wolfinsohn
November 24, 2012 at 8:01 amtxt = “2,6,3,8,1,5,3,1,4,5,4,2”;
f = timeToFrames(time);
s = txt.split(“,”);
parseInt(s[Math.min(f,s.length-1)])this script above you wrote works on the opacity of a solid. but when i try to apply it to a slider i attached to a null it gives me an error of –
class ‘array’ has no property or method named ‘-1’when i turn on expressions for the slider it first looks like this before i put the script in –
effect(“m-shape”)(1)thanks!
-
Dan Ebberts
November 24, 2012 at 5:21 pmTry changing the last line to this:
parseInt(s[clamp(f,0,s.length-1)],10)
Dan
-
Ben Wolfinsohn
November 24, 2012 at 6:49 pmin general, if you can have at the end of your expression ” == 8″ and you can have a ” < 1″ but can you have both with a “or”?
-
Dan Ebberts
November 24, 2012 at 7:21 pmlike this (it’s just core JavaScript):
if((i == 8) || (i < 1))
Dan
Reply to this Discussion! Login or Sign Up