ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

substr is not a function error

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
David Cabestany
substr is not a function error
on Jan 31, 2018 at 8:57:03 pm

An expression that was working fine before, in fact it still does in the previous files where I applied it, now it's reporting 'substr is not a function' as an error.

I didn't change anything in the expression and haven't updated my version of AE.

Can anyone help me figure out this cryptic error?

Thanks.

L = text.sourceText.length;
sp=thisComp.layer("xp").effect("Speed")("Slider");
st=thisComp.layer("xp").effect("Start At")("Slider");
PT = time - thisLayer.inPoint;
T = PT*sp-st*sp;
F = Math.round(PT % 1);

if(F == 1 | (T0) )

{Fl = "|"}
else{Fl ="";}

substr(0,T) + Fl


Return to posts index

Dan Ebberts
Re: substr is not a function error
on Jan 31, 2018 at 10:26:46 pm

Sorry for the silly question--you did apply this to a Source Text property, yes?

Dan



Return to posts index

David Cabestany
Re: substr is not a function error
on Jan 31, 2018 at 11:55:00 pm

No silly questions here.
Yes, to the source text property

Thanks,


Return to posts index


Dan Ebberts
Re: substr is not a function error
on Feb 1, 2018 at 1:08:52 am

I'm not getting a "substr" error, but I do get an error about this line:

if(F == 1 | (T0) )

When I change it to this (just guessing):

if(F == 1 | (T < 0) )

I don't get any errors, and the expression does something (not sure if it's what you expect though).

Dan



Return to posts index

David Cabestany
Re: substr is not a function error
on Feb 1, 2018 at 5:16:21 pm

It sort of does what's supposed to, but not quite.
The idea is to add a blinking cursor at the end, but for it to be visible as the sentences gets written, the second slider would delay the beginning of the writing but the blinking cursor would be there from the very first frame.

With your revision I'm not getting the error anymore but the cursor is not blinking before the text begins to write.

I'll manage with this.
Thanks for your help Dan.


Return to posts index

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