codice:
onClipEvent (load) {
acc = 2;
iner = 1.5;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
finex = 190;
finey = 190;
iniziox = this._xscale;
inizioy = this._yscale;
velocx = (velocx+(finex-iniziox)/acc)/iner;
velocy = (velocy+(finex-inizioy)/acc)/iner;
this._xscale += velocx;
this._yscale += velocy;
} else {
finex = this._xscale;
finey = this._yscale;
velocx = (velocx+(finex-100)/acc)/iner;
velocy = (velocy+(finey-100)/acc)/iner;
this._xscale -= velocx;
this._yscale -= velocy;
}
}
ti piace kosì ?