I've been looking into making a spify menu for a web page. I noticed that the flash of the week at flashkit was a menu with neato bouncy buttons that bob up and down on press. I downloaded it and poked around in it to learn alittle about how you make such nice fluid "bounces". I found on the button this script.



onClipEvent (load) {
xskal = 100;
yskal = 100;
jump = false;
sX = 0;
sY = 0;
multiplikator = .8;
ratio = .3;
titel = "Contact";
}
onClipEvent (enterFrame) {
if (!jump) {
sX = Number(sX*multiplikator)+Number((xskal-_xscale)*ratio);
sY = Number(sY*multiplikator)+Number((yskal-_yscale)*ratio);
_xscale += sX;
_yscale += sY;
}
}




I know thats kinda alot to read. But could someone explain in genreal how that math comes out to me sweet lookin buttons?? Im trying to learn AS.