A mi me gustaria convertir ese array en un xml, es posible esto? asi puedo agregar la cantirad de fotos que yo quiera sin tener que estar entrando al .fla, si no solamente modificando un xml, ya se a manualmente o desde un formulario en php.
Este es el código del fla:
Código PHP:
/////////////////////////ARRAYS QUE QUIERO CAMBIAR POR XML//////////////////////////////////////////////////////
//This array is where you will enter the folder name and file name of your image.
//You can add as many images as you like and reference them here.
var images:Array = new Array ("galleries/images1/01.jpg","galleries/images1/02.jpg","galleries/images1/03.jpg","galleries/images1/04.jpg","galleries/images1/05.jpg"
,"galleries/images1/06.jpg","galleries/images1/07.jpg","galleries/images1/08.jpg","galleries/images1/09.jpg","galleries/images1/10.jpg"
,"galleries/images1/11.jpg","galleries/images1/12.jpg","galleries/images1/13.jpg");
//This array determines the title for each image, add titles in the same order as your images.
var titles:Array = new Array ("Image Title 1","Image Title 2","Image Title 3","Image Title 4","Image Title 5",
"Image Title 6","Image Title 7","Image Title 8","Image Title 9","Image Title 10",
"Image Title 11","Image Title 12","Image Title 13");
////No need to edit the rest///////////////////////////////////////////////////////////////////////////
var nId:Number = -1;
var nIm:Number = 0;
desc_txt.html = true;
desc_txt.autoSize = "left";
total_txt.html = true;
total_txt.autoSize = "right";
/////////next image function///////////////////////////////////////////////////////////////////////////
function nextImage ():Void {
if (nId == images.length - 1) {
trace ("End");
} else {
nId += 1;
nIm += 1;
_root.attachMovie ("img_mc", "img_mc" + nIm, nIm + 1);
eval (_root["img_mc" + nIm])._x = 0;
eval (_root["img_mc" + nIm])._y = 0;
_root.alphaTo (100, 0, "linear", 0, function () {
eval (_root["img_mc" + nIm]).mcl.loadClip (images[nId], eval (_root["img_mc" + nIm]).loaderMC);});
desc_txt.htmlText = (titles[nId].toUpperCase ());
desc_txt._alpha = 0;
desc_txt.alphaTo (100, 1);
counter = addZero ((nId + 1), 2);
total = addZero (images.length, 2);
total_txt._alpha = 0;
total_txt.alphaTo (100, 1);
total_txt.htmlText = counter + "<font color='#555555'>" + "/" + total + "</font>";}}
/////////previous image function///////////////////////////////////////////////////////////////////////////
function prevImg ():Void {
if (nId <= 0) {
trace ("End");
} else {
nId -= 1;
nIm += 1;
_root.attachMovie ("img_mc", "img_mc" + nIm, nIm + 1);
eval (_root["img_mc" + nIm])._x = 0;
eval (_root["img_mc" + nIm])._y = 0;
_root.alphaTo (100, 0, "linear", 0, function () {
eval (_root["img_mc" + nIm]).mcl.loadClip (images[nId], eval (_root["img_mc" + nIm]).loaderMC);});
desc_txt.htmlText = (titles[nId].toUpperCase ());
desc_txt._alpha = 0;
desc_txt.alphaTo (100, 1);
counter = addZero ((nId + 1), 2);
total = addZero (images.length, 2);
total_txt._alpha = 0;
total_txt.alphaTo (100, 1);
total_txt.htmlText = counter + "<font color='#555555'>" + "/" + total + "</font>";}}
/////////add zeros to image counter function///////////////////////////////////////////////////////////////////////////
function addZero (n, q):String {
var str = Math.pow (10, (q - n.toString ().length)).toString ().substr (1) + n;
return str;}
nextImage ();
/////////next and previous button code, calls the functions above///////////////////////////////////////////////////////////////////////////
next_btn.onRelease = nextImage;
prev_btn.onRelease = prevImg;
/////////sets the next and previous buttons alpha on rollover///////////////////////////////////////////////////////////////////////////
prev_btn.onRollOver = next_btn.onRollOver = function () {
this.alphaTo (100, 1);};
prev_btn.onRollOut = next_btn.onRollOut = function () {
this.alphaTo (50, 1);};
Ojala hallan entendido la pregunta y me puedan ayudar.
Muchas gracias, saludos