You can control the quantity of the bounce to some extend by using the
last two optional arguments in Elastic. I played with them for a bit,
but couldn't tweak it to the point where it behaves as the animation
you described.
Hope it helps.. Godd luck!
-- code --
import mx.transitions.Tween;
import mx.transitions.easing.Elastic;
var obj = mc;
var time = 0;
var prop = "_x";
var begin = obj[prop];
var end = begin + 400;
var change = end-begin;
var duration = 5;
var fps = 31;
var done = false;
var a = change * 2; // looks like some sort of multiplier on the swing
var p = (duration*fps) * 0.3; // magnetic force (lower = faster)
onEnterFrame = function() {
if (time < duration*fps) {
obj[prop] = Elastic.easeOut(time++, begin, change,
duration*fps, a, p);
} else {
time = 0;
}
}
2006/10/5, Mendelsohn, Michael <[EMAIL PROTECTED]>:
You could probably tween something using the None easing method for a
long distance, giving it linear movement, then when the tween is done,
call onMotionFinished, and give it a new tween, but this time, over a
short distance, and with bounces. I don't think you can control the
amount of bounces.
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com