Ho creato un mc e gli ho assegnato il seguente codice per testare un semplice zoom in AS (stò cercando d'imparare). Il problema è che quando s'ingrandisce riesco a fermarla ad una determinate grandezza mentre quando si rimpicciolisce no...why?
onClipEvent (load) {
zoom = 3;
}
on (rollOver) {
useHandCursor = false;
i = this._width;
a = this._height;
this.onEnterFrame = function() {
if ((this._width<=290) && (this._height<=250)) {
i += zoom;
a += zoom;
this._width = i;
this._height = a;
}
}
}
on (rollOut) {
i = this._width;
a = this._height;
this.onEnterFrame = function() {
if ((this._width != 230) && (this._height != 200)) {
i -= zoom;
a -= zoom;
this._width = i;
this._height = a;
}
}
}
Help me please![]()
Bye

Rispondi quotando