| I'm having a fun time figuring out a scripting problem and thought I would ask the advice of the script gurus on the list.
Basically I want to add 2 sliders then get the value of those sliders.
var RED_Slider = selectedLayer.Effects.addProperty("Slider Control"); var red = RED_Slider(1).value;
var GREEN_Slider = selectedLayer.Effects.addProperty("Slider Control"); var green = GREEN_Slider(1).value;
If I run the code above, it works great however if I change the order and assign the sliders first then try to get the value, AE gives me an "invalid object" error.
So the code below will not work.
var RED_Slider = selectedLayer.Effects.addProperty("Slider Control"); var GREEN_Slider = selectedLayer.Effects.addProperty("Slider Control");
var red = RED_Slider(1).value; var green = GREEN_Slider(1).value;
It's almost as if when I add the Green Slider, it forgets the Red Slider.
Any ideas?
Cheers.
Phil
Phil Spitler | Creative Technologist | Bonfire Labs | t : 415.394.8200 m : 415.571.3139
Website | Facebook | LinkedIn
|