Ver Mensaje Individual
  #1 (permalink)  
Antiguo 10/06/2004, 03:16
Enea
 
Fecha de Ingreso: junio-2003
Mensajes: 744
Antigüedad: 20 años, 10 meses
Puntos: 0
Comentar codigo

Buenas...

Un favor... :)
Podríais comentarme este trozo de código es el control de imagenes que estaba buscando...
Lo he probado y me funciona pero como que es para aprender quiero entenderlo.

onClipEvent (load) {
this._parent.mag.gotoAndStop(2);
var yesc_inicial = this._yscale;
var xesc_inicial = this._xscale;
var xmov_inicial = this._x;
var ymov_inicial = this._y;
var yesc_final = yesc_inicial;
var xesc_final = xesc_inicial;
var xmov_final = xmov_inicial;
var ymov_final = ymov_inicial;
var mov = false;
var mag = true;
var demora = 3;
}
onClipEvent (enterFrame) {
if (mag) {
this._yscale -= (this._yscale-yesc_final)/demora;
this._xscale -= (this._xscale-xesc_final)/demora;
this._x -= (this._x-xmov_final)/demora;
this._y -= (this._y-ymov_final)/demora;
}
if (mov) {
this.xmov_final = this._x;
this.ymov_final = this._y;
}
}
on (rollOver) {
Mouse.hide();
this._parent.cursores._visible = true;
}
on (rollOut) {
Mouse.show();
this._parent.cursores._visible = false;
}
on (press) {
if (mov) {
startDrag(this);
}
}
on (release, releaseOutside) {
if (mag) {
this.yesc_final += 40;
this.xesc_final += 40;
this.xmov_final -= _parent.mascara._xmouse;
this.ymov_final -= _parent.mascara._ymouse;
} else {
this.stopDrag();
}
}

Gracias!
__________________
Ibisof | Saludos desde Eivissa !!! :p