I’m trying to adjust the amplitude of the elastic easing class - after hours of trying to figure this out im still clueless. The documentation here: http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/fl/transitions/easing/Elastic.html vaguely touches upon the parameters to do so but so far i’ve been unable to implement it into practice. I think i need someone to provide an example to how this works.
Could anybody shed some light on this? I’d appreciate it. Thanks in advance!
You can pass in the easing params as an array in [COLOR=“Blue”]TweenMax[/COLOR].
Test this:
import fl.transitions.*;
import fl.transitions.easing.*;
var myTween:Tween = new Tween(box, "y", Elastic.easeIn, 100, 300, 1, true);
var myTween_1:Tween = new Tween(box, "y", Elastic.easeIn, 300, 100, 1, true);
myTween_1.addEventListener(TweenEvent.MOTION_FINISH, function(TweenEvent)
{myTween.start();
});
myTween.addEventListener(TweenEvent.MOTION_FINISH, function(TweenEvent)
{myTween_1.start();
});
var amplitude:uint=100;
myTween.begin=200-amplitude;
myTween.finish=200+amplitude;
myTween_1.begin=200+amplitude;
myTween_1.finish=200-amplitude;
http://dnadillo.dn.ua/fla/js-swf-html/tween-amplitude-regulator.swf
http://dnadillo.dn.ua/fla/js-swf-html/tween-amplitude-regulator.zip
[URL=“http://dnadillo.dn.ua/fla/filter-button.zip”]