I'm newbie in After Effects. I've learned how to control slider from expressions. Now I need to get value of slider in script (jsx/extendscript). How can I achieve that?

I've tried (in *.jsx): var a = comp.layer("Slider 1").effect("Slider Control")("Slider")[0];


After Effects error: Unable to call "setValue" because of parameter 1. Value "NaN" of element 0 in the array is not a valid float.

It means that value of slider is not set yet?



Here is a example:

var slider = comp.layers.addNull();
slider.name = "Slider";
slider.effect.addProperty("ADBE Slider Control")("Slider");
slider.effect("Slider Control").property("Slider").setValue(100);

var a = slider.effect("Slider Control").property("Slider");
var titleTriangle = comp.layers.addShape();
titleTriangle.name = ("Title Triangle");
var titleTriangleGroup = titleTriangle.property("Contents").addProperty("ADBE Vector Group");
var titleTriangleFill= titleTriangleGroup.property("Contents").addProperty("ADBE Vector Graphic - Fill");

// using 'a' here
  • Please paste all code here. It is difficult to understand, where can be problem, when you are seeing only part of code.
    – Shultc
    Apr 24, 2016 at 12:31
  • @Shultc, thank you for response. I have added an example.
    – 49volro
    Apr 24, 2016 at 14:38
  • Sounds like you need to know about Redefinery's RD_Gimme_Props script. It's a script that allows you to find the correct path for any composition element: bit.ly/1XTIzh0 There's a whole bunch of tools there for extendscript developers.
    – stib
    Apr 26, 2016 at 4:57

1 Answer 1


I found out - .value after slider.effect("Slider Control").property("Slider") and it works.

var a = slider.effect("Slider Control").property("Slider").value

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.