ciao a tutti. avrei bisogno di un consiglio se potete...
muovo un clip con un effetto elastico usando questo script:
onClipEvent (load) {
this.acc = 3;
this.ine = 1.2;
this.endw = 100;
this.endh = 100;
this.endx = _x+210;
this.endy = _y+0;
}
onClipEvent (enterFrame) {
if (_root.vai) {
this.dw = (this.dw+(this.endw-this._width)/this.acc)/this.ine;
this.dh = (this.dh+(this.endh-this._height)/this.acc)/this.ine;
this.dx = (this.dx+(this.endx-this._x)/this.acc)/this.ine;
this.dy = (this.dy+(this.endy-this._y)/this.acc)/this.ine;
this._width += width;
this._height += height;
this._x += this.dx;
this._y += this.dy;
}
if (!_root.vai) {
this.dw = (this.dw+(this.endw-this._width)/this.acc)/this.ine;
this.dh = (this.dh+(this.endh-this._height)/this.acc)/this.ine;
this.dx = (this.dx+(x-_x)/this.acc)/this.ine;
this.dy = (this.dy+(y-_y)/this.acc)/this.ine;
this._width += width;
this._height += height;
this._x += this.dx;
this._y += this.dy;
}
}
e c'è un pulsante che da il via a questa animazione tramite lo script
on (rollOver) {
_root.vai = true;
}
on (rollOut) {
_root.vai = false;
}