sb.animationAddStep(id, stepSata)
Add a step to a created animation. The id must be from a call to sb.animationCreate. The stepData parameter defines the animation step values. NOTE: If both "to" and "delta" are given then the "to" value is used.
Parameters: id The animation id to add the step to data An object of animation step values which can include: key The data key for the animation step to act upon rate The animation rate string: [linear | easein | easeout | easeinout | bounce] duration The length of the step (ms) offset The offset from animation start where this step begins (ms) from The value to start the animation at, if not specified the value is the current value of "key" to The endpoint for the animation delta The delta for the end of the animation from the start point.
Example: function createAnimation() { var stepData = {}; // slide the x position 400 pixels over 2000 ms and auto-destroy // it on completion var id = sb.animationCreate(60, 1); stepData.rate = "linear"; stepData.duration = 2000; stepData.offset = 0; stepData.delta = 400; stepData.key = "mylayer.mycontrol.grd_x"; sb.animationAddStep(id, stepData); }