-
Strange
Hi there,
I’m getting a result I don’t understand and I’m looking to see if anyone can help.
I have a text layer with an Expression Slider effect on it named “CurrentCell”. The slider has hold keyframes values of 5,9,13…
In the Source Text property of the text layer I have the following code:
vars =
“13,-1,13,13,L,NW, ,14,L,SW, ,14,L,E, ,14,L,N, ,14,L, , “.split(“,”);
TargetCell = effect(“CurrentCell”)(“Slider”);
temp = vars[TargetCell](The spaces are meant to be there, place holders for values not in use in this instance)
With CurrentCell at a starting value of 5 the result should be NW, but the result I’m getting is “undefined”, once the slider changes to 9 I get the expected result of SW. If I hard code the 5 “temp = vars[5]” I get the expected NW.Can anyone explain why I’m getting these strange results?
It is very frustrating as the code makes sence to me, but the result dont.Thanks,
Stephen