JoeyClams
06-05-2003, 10:07 PM
Anybody got the skinny on how the expandable elastic boxes were made on in2media.com?? (click on top nav)
Is it AS or tweening? I did the elasticity tutorial at bit-101 and also tried the following functions but that didn't get the desired results...
On Frame:
MovieClip.prototype.elasticScale = function(targt, accel, friction) {
this.speed += (targt - this._xscale) * accel;
this.speed *= friction;
this._xscale = this._yscale += this.speed;
}
MovieClip.prototype.elasticMove = function(targt, accel, friction) {
this.speed += (targt - this._x) * accel;
this.speed *= friction;
this._x += this.speed;
}
On Clip:
/*onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.elasticScale(2500, .9, .6)
} else {
this.elasticScale(10, .6, .5)
}
}
... then I figured it was frameXframe animation (like on ninedots.com (click on 'Nike')) but it's still not quite right.....
any idea'ers???
Is it AS or tweening? I did the elasticity tutorial at bit-101 and also tried the following functions but that didn't get the desired results...
On Frame:
MovieClip.prototype.elasticScale = function(targt, accel, friction) {
this.speed += (targt - this._xscale) * accel;
this.speed *= friction;
this._xscale = this._yscale += this.speed;
}
MovieClip.prototype.elasticMove = function(targt, accel, friction) {
this.speed += (targt - this._x) * accel;
this.speed *= friction;
this._x += this.speed;
}
On Clip:
/*onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.elasticScale(2500, .9, .6)
} else {
this.elasticScale(10, .6, .5)
}
}
... then I figured it was frameXframe animation (like on ninedots.com (click on 'Nike')) but it's still not quite right.....
any idea'ers???