ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Array variable attached to slider not working right

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Stephen Schleicher
Array variable attached to slider not working right
on Apr 26, 2018 at 1:48:51 am

So I'm trying to use a variable attached to a slider to control which line from a .json file the data is being read from.

This works:
eval("var temp="+footage("miaa.json").sourceText);
X=0
temp[X].R1

This does not:
eval("var temp="+footage("miaa.json").sourceText);
X=thisComp.layer("line").effect("Slider Control")("Slider");
temp[X].R1

Can anyone help me out here?


Return to posts index

Dan Ebberts
Re: Array variable attached to slider not working right
on Apr 26, 2018 at 6:16:57 am

Try changing this line:

X=thisComp.layer("line").effect("Slider Control")("Slider");

to this:

X=thisComp.layer("line").effect("Slider Control")("Slider").value;


Dan



Return to posts index

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