Me estoy rompiendo la cabeza pero no logro que programar un autoplay a mi galeria xml (para que las fotos vayan pasando sin hacer click en NEXT)
aqui el codigo:
Código ActionScript :
//Importamos las clases para transicion-----
import mx.transitions.Tween;
import mx.transitions.easing.*;
//creamos los arrays para almacenar datos del xml
var urls:Array = new Array();
var titulos:Array = new Array();
var current:Number;
holder._width = 501;
holder._height = 310;
//----------------------El XML---------------------
var x:XML = new XML();
x.ignoreWhite = true;
x.onLoad = function(success) {
var photos:Array = this.firstChild.childNodes;
for(i=0;i<photos.length;i++) {
urls.push(photos[i].attributes.url);
titulos.push(photos[i].attributes.titulo);
}
holder.loadMovie(urls[0]);
cuadro_titulo.txt_titulo.text = titulos[0];
current = 0;
}
x.load("imagenes.xml");
//------------PREV Y NEXT-------------
previous.onRelease = function() {
if(current > 0) {
current--;
holder.loadMovie(urls[current]);
cuadro_titulo.txt_titulo.text = titulos[current];
alphaTw = new Tween(holder, "_alpha", Regular.easeOut, 0, 100, 10, false);
}
}
next.onRelease = function() {
if(current < urls.length-1) {
current++;
holder.loadMovie(urls[current]);
cuadro_titulo.txt_titulo.text = titulos[current];
alphaTw = new Tween(holder, "_alpha", Regular.easeOut, 0, 100, 10, false);
}
}
//Efecto cuadro del titulo
cuadro_titulo.onRollOver = function(){
alphaTw = new Tween(cuadro_titulo, "_alpha", Regular.easeIn, 5, 100, 7, false);
}
cuadro_titulo.onRollOut = function(){
alphaTw = new Tween(cuadro_titulo, "_alpha", Regular.easeOut, 100, 20, 7, false);
}Por favor si alguien me puede ayudarrr !!!
