PDA

View Full Version : Elasticity



tolgainam
April 25th, 2005, 06:46 AM
Hi,
Im using the fallowing code for a smooth movement for objects, the thing I want is I also want it to be like elastic.

MovieClip.prototype.closefolder = function(newidth, newheight, speed, loader) {
this.onEnterFrame = function() {
current_w = this._width;
current_h = this._height;
this._width -= (current_w-newidth )/speed;
this._height -= (current_h-newheight)/speed;
};

How to do that ?
thanks

scotty
April 25th, 2005, 08:53 AM
http://www.kirupa.com/developer/actionscript/spring.htm
http://www.bit-101.com/tutorials/elasticity.html

scotty(-:

tolgainam
April 26th, 2005, 04:44 AM
I cant make them scale down and also stay elastic atthe same time, need help please.