Ver Mensaje Individual
  #2 (permalink)  
Antiguo 23/07/2004, 17:46
Avatar de trivliani
trivliani
 
Fecha de Ingreso: enero-2004
Ubicación: Nicolas Romero. Edo. de México.
Mensajes: 336
Antigüedad: 20 años, 3 meses
Puntos: 0
esta

Hola hermano si quieres te paso el código AS con el que esta hechos o si quieres te paso el archivo.....

O ya se mejor te paso el código y luego si no le entiendes a mi explicación te paso un archivo con un efecto

Tendrás que crear algunos Mc con los gráficos que quieras a los cuales darás el nombre en la barra de propiedades. el nombre será "c1" y hacia asta el "c5" ósea aras cinco MC y a cada uno le asignaras el nombre c1,c2,c3,c4 y c5 después crearas una caja de texto dinámico a el cual también le pondrás un nombre en la barra de propiedades en este caso será "output" y integras el siguiente código en algún freami.

Stage.scaleMode = "noScale";
/*
hay te va el chorote , clip y targetLevel.
clip: es el clip que la clase va a controlar.
targetLevel: es el nivel pariente al que apuntaran en caso
de quererle modificar algo, o enviar parámetros.
*/

CustomClip = function(clip,targetLevel){
this.clip = clip; //clip que controla la clase.
this.clip.name = clip._name; //name = a nombre del clip.
this.clip.f =0.78; //friccion
this.clip.r= 0.3; //radio
this.clip.ts = 100; //target Scale.
this.clip.targetLevel = targetLevel //target level.
this.clip.onRollOver = this.customRollOver;
this.clip.onRollOut = this.customRollOut;
this.clip.reset = this.reset; //se le asigana la funcion reset de la clase al clip.
this.clip.onEnterFrame = this.myScale;
this.clip.onPress = this.customPress;
this.clip.onRelease = this.clip.onReleaseOutside = this.customRelease;
}

CustomClip.prototype.customRollOver = function (){
this.swapDepths(++ this.targetLevel.depth);
this.ts = 150;
}
CustomClip.prototype.customRollOut = function (){
this.ts = 100;
}
CustomClip.prototype.customPress = function (){
this.startDrag()
}
CustomClip.prototype.customDragOut = function (){
this.myDragOut();
}
CustomClip.prototype.reset = function(){
stopDrag();
this.ts = 100;
}
CustomClip.prototype.customRelease = function (){
this.targetLevel.output.text = this.name + " llamando a tierra";
this.reset();
}

CustomClip.prototype.myScale = function (){
this.scale += (this.vt = this.vt * this.f + (this.ts - this._xscale) * this.r)
this._xscale = this._yscale = this.scale;
}

depth = 1;

btn1 = new CustomClip(c1,this)
btn2 = new CustomClip(c2,this)
btn3 = new CustomClip(c3,this)
btn4 = new CustomClip(c4,this)
btn5 = new CustomClip(c5,this)
stop();
[/CODE][/HTML][/PHP]


este código me lo paso un cuate espero que te sea de ayuda y si no te sale me dices y te mando el archivo con el Fla. y el sfw.

Suerte :)
__________________
un favor con otro y eso es todo..

Última edición por trivliani; 23/07/2004 a las 17:51 Razón: equibocacion