Hi,
i want to script an everlasting oscillating movement with changing amplitudes – but i can't get it to work ...
import com.greensock.*;
import com.greensock.easing.*;
import com.greensock.plugins.*;
TweenPlugin.activate([DynamicPropsPlugin]);
function getAmplitude():String {return String(50);}
TweenMax.to(my_mc,1,{dynamicProps:{_y:getAmplitude}, repeat:-1, ease:Sine.easeInOut, yoyo:true});
//TweenMax.to(my_mc,1,{_y:"50", repeat:-1, ease:Sine.easeInOut, yoyo:true});
If i use the last line of code, the tweening is okay. But i want to change the _y:"50" to different values, so i tried it with dynamicProps – but the effect is completely different as i expected ... if i use the code with the dynamicProps i expected the same behaviour ...
Second question: is there an "ease:" with a +/- movement? ease:Sine.easeInOut is from (example above) 0 to 50 to 0, but i would like to have 0 to 25 to 0 to -25 to 0 ...
Thanks for your help,
Tobias