Tengo lo siguiente:
Para acercar
Código :
function acerca(ancho:Number, largo:Number, ypos:Number) {
if (this._width<((ancho)*1.1) && this._height<((largo)*1.1) && this._y<(ypos+30)) {
this._y -= 2;
this._width += 1;
this._height += 1;
}
}
y para alejar
Código :
function aleja(ancho:Number, largo:Number, ypos:Number) {
if (this._width>ancho && this._height>largo && this._y<(ypos)) {
this._y += 2;
this._width -= 1;
this._height -= 1;
}
}
y para llamarlas
Código :
intro_btn.onRollOver = function() {
this.onEnterFrame = acerca(80,65,161);
};
intro_btn.onRollOut = function() {
this.onEnterFrame = aleja(80,65,161);
};
Cuando paso por encima, no se mueve, pero no tanto como cuando uso la funcion directamente.
Código :
inicio_btn.onRollOver = function() {
ancho = 60;
largo = 65;
ypos = 161;
this.onEnterFrame = function() {
if (this._width<((ancho)*1.1) && this._height<((largo)*1.1) && this._y<(ypos+30)) {
this._y -= 2;
this._width += 1;
this._height += 1;
}
};
};Ojala puedan ayudarme!
Gracias!
