Ver Mensaje Individual
  #2 (permalink)  
Antiguo 16/09/2009, 10:41
Avatar de d12c12g88
d12c12g88
 
Fecha de Ingreso: diciembre-2006
Mensajes: 142
Antigüedad: 17 años, 4 meses
Puntos: 1
Respuesta: desplazamiento de movieclip

Hola,

Espero no haber confundido tu idea. Con este código que te paso al iniciar la animación, las imágenes se mueven solas hacia la izquierda, una ves que pasas
el cursor por cualquiera de los botones, la animación se detiene y empieza la animación que asigna el botón, si esta bien?

Código:
var Fin:Number = -418.8;
var limite2:Number = Fin+10;
var Inicio:Number = 414.1;
var limite1:Number = Inicio-10;
var MC:MovieClip = this.createEmptyMovieClip("MC", this.getNextHighestDepth());
MC.onEnterFrame = function() {
	if (_root.mc1._x>=limite2) {
		_root.mc1._x -= 10;
	} else {
		_root.mc1._x = Fin;
	}
};
bt3.onRollOver = function() {
	delete this._parent.MC.onEnterFrame
	this.onEnterFrame = function() {
		if (_root.mc1._x>=limite2) {
			_root.mc1._x -= 10;
		} else {
			_root.mc1._x = Fin;
			delete this.onEnterFrame;
		}
	};
};
bt3.onRollOut = function() {
	delete this.onEnterFrame;
};
bt4.onRollOver = function() {
	delete _root.MC.onEnterFrame
	this.onEnterFrame = function() {
		if (_root.mc1._x<=limite1) {
			_root.mc1._x += 10;
		} else {
			_root.mc1._x = Inicio;
			delete this.onEnterFrame;
		}
	};
};
bt4.onRollOut = function() {
	delete this.onEnterFrame;
};
Espero y te sirva

Saludos