Foros del Web » Creando para Internet » Flash y Actionscript »

Slider Horizontal ayuda con condigo

Estas en el tema de Slider Horizontal ayuda con condigo en el foro de Flash y Actionscript en Foros del Web. Hola, tengo este codigo que genera un slider horizontal: Código: // SlideMenu funtion controls the speed of the movement to the next window // Change ...
  #1 (permalink)  
Antiguo 27/10/2009, 13:59
Avatar de nezu  
Fecha de Ingreso: junio-2007
Mensajes: 177
Antigüedad: 16 años, 10 meses
Puntos: 0
Slider Horizontal ayuda con condigo

Hola, tengo este codigo que genera un slider horizontal:


Código:
// SlideMenu funtion controls the speed of the movement to the next window
// Change the last number if you want to change the speed
function SlideMenu() {
	this._x += (newX-this._x)/16;
}
// This next line calls the funtion named SlideMenu
WindowIN.Contents.onEnterFrame = SlideMenu;
newX = 0;
newY = 0;
//The next line is where you indicate the total number of display area(s)
PageTotal = 12;
//This is where we set our counter to 1
//The counter later limits the count to a maximum of the number set in PageTotal
CounterDisplay = 1;
//The following function is assigned to the Forward button
Forward.Forward.onPress = function() {
	CounterNumber++;
	XNumber++;
	// limit input field to a maximum as indicated above in PageTotal
	if (CounterNumber>PageTotal-1) {
		CounterNumber = 0;
		XNumber = 0;
		YNumber = 0;
	}
	CounterDisplay = CounterNumber+1;
	if (XNumber>12) {
		XNumber = 0;
		YNumber++;
	}
	newX = -XNumber*865;
	newY = -YNumber*443;
};
//This is a similar function for the Back button except in reverse
Back.Back.onPress = function() {
	CounterNumber--;
	XNumber--;
	if (CounterNumber<0) {
		CounterNumber = PageTotal-1;
		XNumber = 11;
		YNumber = 11;
	}
	CounterDisplay = CounterNumber+1;
	if (XNumber<0) {
		XNumber = 11;
		YNumber--;
	}
	newX = -XNumber*865;
	newY = -YNumber*443;
};
stop();

Lo que necesito modificarle son dos cosas..

1. que al comienzo no me haga un barrido raro, donde las imagenes
vienen de la derecha.

2. que al llegar al final no rebobine toda la tira de imagenes sino que empiece
nuevamente.

Bueno, quizas es un poco complicado a la distancia...pero cualquier
ayuda será bien recibida.

:)


pd: el codigo base que estuve utilizando es de esta película:

http://www.flashkit.com/movies/Appli...0560/index.php

Última edición por nezu; 27/10/2009 a las 15:16 Razón: encontre un link
  #2 (permalink)  
Antiguo 28/10/2009, 13:48
Avatar de nezu  
Fecha de Ingreso: junio-2007
Mensajes: 177
Antigüedad: 16 años, 10 meses
Puntos: 0
Respuesta: Slider Horizontal ayuda con condigo

alguna idea?. cualquier ejemplo parecido tmb sera apreciado.
gracias.
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 19:30.