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

precarga de thumbs xml

Estas en el tema de precarga de thumbs xml en el foro de Flash y Actionscript en Foros del Web. hola amigos, pucha tengo un tremendo problema que no he podido solucionar. He estado preparando una galeria de imágenes flash <-> xml con preloaders......todo va ...
  #1 (permalink)  
Antiguo 10/12/2007, 09:56
 
Fecha de Ingreso: enero-2007
Mensajes: 10
Antigüedad: 17 años, 3 meses
Puntos: 0
Pregunta precarga de thumbs xml

hola amigos, pucha tengo un tremendo problema que no he podido solucionar.
He estado preparando una galeria de imágenes flash <-> xml con preloaders......todo va bien cuando presiono los thumbnails y se carga la imagen a mostrar....pero el problema es que tambien quiero que me aparezca la carga de las thumbnails y pues no he podido hacerlo .

porfa si alguien me puede hechar una ayudita
se lo agradeceria por montones

EL CODE:
stop();
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
description = [];
thumbnails = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
description[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
thumbnails[i] = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue;
thumbnails_fn(i);
}
firstImage();
} else {
content = "file not loaded!";
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("IMAGES.xml");
/////////////////////////////////////

p = 0;

//PRELOADER
this.onEnterFrame = function() {
filesize = picture.getBytesTotal();
loaded = picture.getBytesLoaded();
txt_loadimage._visible = true;
if (loaded != filesize) {
txt_loadimage.text = "Loading Image:% "+ Math.round((loaded/filesize)*100);
} else {
txt_loadimage._visible = false;
if (picture._alpha<100) {
picture._alpha += 10;
}
}
};

//PROXIMAS IMAGENES
function nextImage() {
if (p<(total-1)) {
p++;
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[p], 1);
txt_titu.text = description[p];
picture_num();
}
}
}
function prevImage() {
if (p>0) {
p--;
picture._alpha = 0;
picture.loadMovie(image[p], 1);
txt_titu.text = description[p];
picture_num();
}
}
function firstImage() {
if (loaded == filesize) {
picture._alpha = 0;
picture.loadMovie(image[0], 1);
txt_titu.text = description[0];
picture_num();
}
}

// shadow
import flash.filters.DropShadowFilter;

//parámetros
var distance:Number = 5; // Distancia de la sombra
var angleInDegrees:Number = 45;
var color = 0x000000;
var alpha:Number = 1;
var blurX:Number = 4;
var blurY:Number = 4;
var strength:Number = .8;
var quality:Number = 3;
var inner:Boolean = false;
var knockout:Boolean = false;
var hideObject:Boolean = false;

// movie clip
thumbnail_mc.filters = [new DropShadowFilter(distance, angleInDegrees, color, alpha, blurX, blurY, strength, quality, inner, knockout, hideObject)];


function thumbnails_fn(k) {
thumbnail_mc.createEmptyMovieClip("t"+k, thumbnail_mc.getNextHighestDepth());
tlistener = new Object();
tlistener.onLoadInit = function(target_mc) {
target_mc._x = (target_mc._width+6.2)*k;
target_mc.pictureValue = k;

target_mc.onRelease = function() {
p = this.pictureValue-1;
nextImage();
};
target_mc.onRollOver = function() {
this._alpha = 50;

};

target_mc.onRollOut = function() {
this._alpha = 100;
};
};
image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener);
image_mcl.loadClip(thumbnails[k], "thumbnail_mc.t"+k);
}

MUCHAS gracias nuevamente de antemano brothers
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 16:36.