Comunidad de diseño web y desarrollo en internet online

scroll automatico en una galeria

Citar            
MensajeEscrito el 05 Dic 2008 12:16 pm
hola
estoy haciendo una galleria programada en javascript que llama a botones "thumb" enlazados a unas imagenes "image0", "image1"...

este es el codigo

this.createEmptyMovieClip("images", 100);
this.attachMovie("mask", "mask", 101);
mask._x = images._x =0;
mask._y = target = 52;
images.setMask(mask);
images._y = -1000;
speed = 5;
for (var i = 0; i<8; i++) {
var img = images.attachMovie("image"+i, "image"+i, i);
img._y = img._height*i;
var thumb = this["thumb"+i];
thumb._alpha = 60;
thumb.pos = target+(i*-img._height);
thumb.onPress = function() {
target = this.pos;
};
thumb.onRollOver = function() {
this._alpha = 100;
};
thumb.onRollOut = function() {
this._alpha = 60;
};
}
this.onEnterFrame = function() {
images._y += (target-images._y)/speed;
};



lo que necesito es que aparte de esto, las imagenes se muevan solas una detras de otra, haciendo un scroll automatico se entiende, mientras nadie clicke los botones

al guien sabe como hacerlo?

Por pauliya

3 de clabLevel



 

msie
Citar            
MensajeEscrito el 05 Dic 2008 10:16 pm
necesito un ejemplo del efecto final... la verdad tu código está confuso y no entiendo qué quieres hacer

Si puedes dar algo más de info, una imagen o algo ayudaría bastante. :D

Saludos

Por Stockman

Claber

145 de clabLevel



 

firefox
Citar            
MensajeEscrito el 05 Dic 2008 10:23 pm
Te cae que es javaescript, paraec mas a actionscript, te recomiendo le des una visitada a la parte de tutoriales hay un menu que se ajusta tu proyecto, se llama menu con easing, con unas decuaciones y te quedaria listo.

Código ActionScript :

this.createEmptyMovieClip("images", 100);
this.attachMovie("mask", "mask", 101);
mask._x = images._x =0;
mask._y = target = 52;
images.setMask(mask);
images._y = -1000;
speed = 5;
for (var i = 0; i<8; i++) {
   var img = images.attachMovie("image"+i, "image"+i, i);
   img._y = img._height*i;
   var thumb = this["thumb"+i];
   thumb._alpha = 60;
   thumb.pos = target+(i*-img._height);
   thumb.onPress = function() {
      target = this.pos;
   };
   thumb.onRollOver = function() {
      this._alpha = 100;
   };
   thumb.onRollOut = function() {
      this._alpha = 60;
   };
}
this.onEnterFrame = function() {
   images._y += (target-images._y)/speed;
};

Por flashreloco

Claber

1310 de clabLevel

1 tutorial
1 articulo

Genero:Masculino  

Webdesigner & Mandilon 2.0

msie

 

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