Foros del Web » Creando para Internet » Flash y Actionscript »

Mejorar este código

Estas en el tema de Mejorar este código en el foro de Flash y Actionscript en Foros del Web. Buenas que tal? de ante mano muchas gracias por entrar al mensaje.... Tengo este código que encontre en Internet para realizar una propuesta a un ...
  #1 (permalink)  
Antiguo 24/08/2009, 07:48
 
Fecha de Ingreso: febrero-2003
Mensajes: 233
Antigüedad: 21 años, 2 meses
Puntos: 4
Mejorar este código

Buenas que tal? de ante mano muchas gracias por entrar al mensaje....

Tengo este código que encontre en Internet para realizar una propuesta a un cliente, le gusto pero quiere que las imagenes grandes se muestre al pasar el mouse y al hacer clic que lleve a una segunda galería... cómo hacerlo? soy nuevo en flash

este es el código actual, y el mismo funciona perfectamente pero al hacer clic en la imagen pequeña la amplía... cómo comente antes necesito que al pasar el mouse sobre la imagen miniatura la amplie, y al hacer click me enlace con otra galeria.

Gracias

onClipEvent (load) {

this.GALLERY = "galeriaimagen";

this.ORIGEN_X = this[this.GALLERY+1]._xscale;

this.ORIGEN_Y = this[this.GALLERY+1]._yscale;

this.maximag = 50;

this.vel = 0.1;

this.MaxDepths = this.maximag+1;

var i = 1;

while (i<=this.maximag) {

var mcImg = this[this.GALLERY+i];

mcImg.startx = mcImg._x;

mcImg.starty = mcImg._y;

if (mcImg._x>this.mcgaleria._x) {

if (mcImg._y<this.mcgaleria._y) {

}

}

if (mcImg._x<this.mcgaleria._x) {

if (mcImg._y>this.mcgaleria._y) {

mcImg.Direction = 2;

} else {

mcImg.Direction = 2;

}

}

mcImg.smoothSizing = function() {

if (!this.bScaling) {

return (undefined);

}

if (this.bExpanded) {

var tx = this._x-this._parent.vel*(this._parent.mcgaleria._x-this.startx);

var ty = this._y-this._parent.vel*(this._parent.mcgaleria._y-this.starty);

switch (this.Direction) {

case 1 :

if (tx<=this.startx) {

this._x = this.startx;

this._y = this.starty;

} else {

this._x = tx;

this._y = ty;

}

break;

case 2 :

if (tx<=this.startx) {

this._x = this.startx;

this._y = this.starty;

} else {

this._x = tx;

this._y = ty;

}

break;

}

var newxscale = this._xscale-this._xscale*this._parent.vel;

var newyscale = this._yscale-this._yscale*this._parent.vel;

if (newxscale<this._parent.ORIGEN_X || newyscale<this._parent.ORIGEN_Y) {

newxscale = this._parent.ORIGEN_X;

newyscale = this._parent.ORIGEN_Y;

this.bScaling = false;

this.bExpanded = false;

}

this._xscale = newxscale;

this._yscale = newyscale;

} else {

var tx = this._x+this._parent.vel*(this._parent.mcgaleria._ x-this.startx);

var ty = this._y+this._parent.vel*(this._parent.mcgaleria._ y-this.starty);

switch (this.Direction) {

case 1 :

if (tx>=this._parent.mcgaleria._x) {

this._x = this._parent.mcgaleria._x;

this._y = this._parent.mcgaleria._y;

} else {

this._x = tx;

this._y = ty;

}

break;

case 2 :

if (tx>=this._parent.mcgaleria._x) {

this._x = this._parent.mcgaleria._x;

this._y = this._parent.mcgaleria._y;

} else {

this._x = tx;

this._y = ty;

}

break;

}

var newxscale = this._xscale+this._xscale*this._parent.vel;

var newyscale = this._yscale+this._yscale*this._parent.vel;

if (newxscale>100 || newyscale>100) {

newxscale = 100;

newyscale = 100;

this.bScaling = false;

this.bExpanded = true;

this._parent.ExpandCompleted();

}

this._xscale = newxscale;

this._yscale = newyscale;

}

};

mcImg.onEnterFrame = function() {

if (this.bScaling) {

this.smoothSizing();

}

};

mcImg.onRelease = function() {

if (!this.bScaling) {

var i = 1;

while (i<this._parent.maximag) {

if (this._parent[this._parent.GALLERY+i].bScaling) {

return (undefined);

}

i++;

}

var NewSelIndex = this._name.substring(this._parent.GALLERY.length, this._name.length);

this._parent.ReduceStarted();

if (this._parent.CurrSelIndex != 0 && this._parent.CurrSelIndex != NewSelIndex) {

this._parent[this._parent.GALLERY+this._parent.CurrSelIndex].bScaling = true;

}

this.bScaling = true;

if (this.bExpanded) {

this._parent.CurrSelIndex = 0;

} else {

this.swapDepths(this._parent.MaxDepths++);

this._parent.CurrSelIndex = NewSelIndex;

}

}

};

i++;

}

}
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 03:21.