Comunidad de diseño web y desarrollo en internet online

Problema para llamar un MC con ActionScript en flash

Citar            
MensajeEscrito el 09 Sep 2011 04:52 am
Hola,

Gracias a la comunidad estoy haciendo una tira de imagenes basandome en un codigo que publicaron aquí, todo esta excelente y apesar de ser un completo novato creo que entiendo el codigo, pero tengo un problema.

Parece ser que solo funciona con el MC "clip1" repetidamente... lo que intento hacer es que llame a "clip2", "clip3" y asi sucesivamente... como debo declararlo en el ActionScript?

Este es el codigo:

escribió:


import mx.transitions.Tween;
import mx.transitions.easing.*;

var entrfrm:Function = function( Void ):Void
{
var sig:MovieClip = this._parent["clip" + (this.index + 1)];
var ant:MovieClip = this._parent["clip" + (this.index - 1)];
if( sig == undefined )
{
var lan:Number = ant._x + ant._width / 2;
this._x = lan + this._width / 2;
}
else if( ant == undefined )
{
var lsg:Number = sig._x - sig._width / 2;
this._x = lsg - this._width / 2;
}
else
{
var lsg:Number = sig._x - sig._width / 2;
var lan:Number = ant._x + ant._width / 2;
this._x = lan + (lsg - lan) / 2;
}
};
var rollovr:Function = function( Void ):Void
{
this.twx.stop();
this.twy.stop();
this.twx = new Tween(this, "_xscale", Regular.easeOut, this._xscale, 100, 1, true);
this.twy = new Tween(this, "_yscale", Regular.easeOut, this._yscale, 100, 1, true);
};
var rollout:Function = function( Void ):Void
{
this.twx.stop();
this.twy.stop();
this.twx = new Tween(this, "_xscale", Regular.easeOut, this._xscale, 75, 1, true);
this.twy = new Tween(this, "_yscale", Regular.easeOut, this._yscale, 75, 1, true);
};
this.clip1.x = this.clip1._x;
for( var i:Number = 1; i <= 4; i++ )
{
this["clip" + i].index = i;
this["clip" + i].onEnterFrame = entrfrm;
this["clip" + i].onRollOver = rollovr;
this["clip" + i].onRollOut = rollout;
}


gracias

Por cesarhc03

2 de clabLevel



 

firefox
Citar            
MensajeEscrito el 09 Sep 2011 03:05 pm
Que es clip1 ... ¿un clip que se duplica? Hay una sola referencia a ese nombre aquí

this.clip1.x = this.clip1._x;

¿Probaste cambiarla?

Jorge

Por solisarg

BOFH

13669 de clabLevel

4 tutoriales
5 articulos

Genero:Masculino   Bastard Operators From Hell Premio_Secretos

Argentina

firefox
Citar            
MensajeEscrito el 09 Sep 2011 03:39 pm
Si pero es decir... solo me funciona si dupllico el clip1 muchas veces...

Si quiero que me lea los otros clip2, clip3, clip 4 (nombres de instancia) no funciona.

Ya probe a cambiarlo a
this.clip2.x = this.clip2._x;

Pero nada... kreo k enlazare el flash para darme a entender

Por cesarhc03

2 de clabLevel



 

firefox
Citar            
MensajeEscrito el 09 Sep 2011 03:43 pm
Seguramente clip1 tiene programación que los otros no

Jorge

Por solisarg

BOFH

13669 de clabLevel

4 tutoriales
5 articulos

Genero:Masculino   Bastard Operators From Hell Premio_Secretos

Argentina

firefox
Citar            
MensajeEscrito el 09 Sep 2011 03:43 pm
No encontré donde editar mi post anterior srry D:!!!

Aca el flash por la persona que lo subio y creador
http://longevie.theninjabunny.com/xtra/Menu_zoom.swf

Por cesarhc03

2 de clabLevel



 

firefox

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.