Ok, tengo un pedazo de secuencia de comandos que un amigo me envió, y estoy tratando de adaptar con no mucha suerte. A continuación se muestra la secuencia de comandos.
Cuando hago clic en el movieclip "pushhome", diapositivas movieclip "home_mc" en la pantalla. Cuando hago clic en "pushclients", "home_mc" se desliza fuera de la pantalla. Esto funciona bien. Pero estoy tratando de agregar una función extra el cual haciendo clic en "pushclients" no sólo de diapositivas "home_mc" OFF, pero se desliza "clients_mc" ON. Como puede ver, he añadido esto a la secuencia de comandos -, pero no va a funcionar! Parece ignorar clients_mc completo. ¿Alguien tiene alguna idea por qué?? Cabe señalar que no soy un aficionado de ActionScript...sólo un principiante tratando de aprender sobre la marcha.

¡Salud!.
Math.easeOutQuad = function(t, b, c, d) {
return -c*(t /= d)*(t-2)+b;
};
MovieClip.prototype.motion = function(clip, pos, speed) {
clip.t = 0;
clip.d = speed;
clip.b = clip._x;
clip.c = pos-clip._x;
clip.onEnterFrame = function() {
if (this.t<=this.d) {
this._x = Math.easeOutQuad(this.t, this.b, this.c, this.d);
this.t++;
} else {
delete this.onEnterFrame;
}
};
};
pushhome.onRelease = function() {
this.motion(home_mc, 700, 25);
};
pushclients.onRelease = function() {
this.motion(home_mc, -300, 25);
this.motion(clients_mc, 700, 25);
};
- Math.easeOutQuad = function(t, b, c, d) {
- return -c*(t /= d)*(t-2)+b;
- };
- MovieClip.prototype.motion = function(clip, pos, speed) {
- clip.t = 0;
- clip.d = speed;
- clip.b = clip._x;
- clip.c = pos-clip._x;
- clip.onEnterFrame = function() {
- if (this.t<=this.d) {
- this._x = Math.easeOutQuad(this.t, this.b, this.c, this.d);
- this.t++;
- } else {
- delete this.onEnterFrame;
- }
- };
- };
- pushhome.onRelease = function() {
- this.motion(home_mc, 700, 25);
- };
- pushclients.onRelease = function() {
- this.motion(home_mc, -300, 25);
- this.motion(clients_mc, 700, 25);
- };