PDA

View Full Version : Xml & Flash + jpg



gabrielgm
July 4th, 2005, 11:45 AM
testing with flash and XML

now i show what i have to do....

http://www.gatodegrandesbotas.com/blog/captura_flash.jpg

i have loaded all text, as "tittle and description" by XML


<TUTORIAL TITULO="4 HOJAS" DESCRIPCION="Amazing proyect, text model" />

that in flash i call like this:

1º photogram



getxmldata = new XML();
getxmldata.load("xmldata.xml");


3º Fotograma


if (getxmldata.loaded) {
var p = getxmldata.firstChild;
xmldoc = getxmldata.childNodes;
TUTORIAL = p.nodeName;
titulo = p.attributes.titulo;
descripcion = p.attributes.descripcion;
canti = p.attributes.canti;
}
stop();



titulo= tittle
descripcion= description
canti= how many in number

all most done, but i what to put in the XML, how many .jpg are in a folder, so that number it's taken by flash, and avariable the pictures to open.

i was thinking do it like this:


aphotos = arrayphotos;
nrophoto = 0;
for(i=0;i<aphotos.length;i++)
{
nrophoto++;
loadMovie(aphotos[i]);
}



nrophoto begins in 0 and it's going to increment.
i have stuck now..

some can help me??