Ver Mensaje Individual
  #7 (permalink)  
Antiguo 27/05/2009, 20:45
Avatar de Diegoazul
Diegoazul
 
Fecha de Ingreso: mayo-2007
Ubicación: { Dash Berlin }
Mensajes: 1.879
Antigüedad: 17 años, 9 meses
Puntos: 67
Respuesta: como parar un desplazamiento en _x

Solo inicia con velocidad = 1, y dos if para hacer un tope suponiendo que la tira mide 300 px seria asi:

Código:
var velocidad:Number = 1;
//
this.onEnterFrame = function() {

	mueve._x += velocidad;
	//
	if (mueve._x>300) {

		mueve._x = 0;
	}
	//   
	if (mueve._x<0) {

		mueve._x = 300;
	}

};
//
//
btn_back.onRelease = function() {
	velocidad = -1;
};
btn_next.onRelease = function() {
	velocidad = 1;
};
btn_stop.onRelease = function() {
	velocidad = 0;

};

de todas formas jorge (sargento), tiene un ejemplo más o menos parecido aquí:

http://www.sargentoweb.com/flash/?doc=30


Hasta mañana!
__________________
{ Flash }