-
Creating and Editing Expression Controls using Scripts
Hello,
I am fairly new to using Scripts in After Effects, but after browsing the After Effects Scripting guide (from Adobe) and searching both Dan Ebberts Motion Script page as well as the AE Enhancers page, I was unsuccesful in finding help on defining/editing the properties of expression controls using scripts.
I would like to write a script that creates a controlable sine-wave motion to the position of a layer in a comp. I would like to use slider controls to define the amplitude, frequency etc. of the sine wave. I have already created the slider controls using the
myLayer.Effect.addProperty(“ADBE Slider Control”) command.
I have also set up the sinewave expression for the position property with fixed values:
something to this effect:
myLayer.property(“position”).expression = “x = 500* Math.cos……etc”
Now, of course I would like the fixed value of 500 to be replaced by the value of my slider control. How do I program that?
I hope that my questions are clear, and I would appreciate any help on this.
Regards,
Rutger