muy buenas para todos menos para mi. hace semanas que vengo luchando con este tema. estoy adaptando un template de una galeria de fotos la cual carga la info mediante un archivo XML. lo curioso es que localmente lo carga sin problemas y se ve fantastica, pero el problema comienza cuando al paso el sitio completo (index.html, preview.swf, content.xml, y las carpetas de las fotos. todo tal cual esta en mi pc) al servidor de dominio.
ya no se que probar, no se que hacer y me estoy desesperando. por lo que lei en diversos foros e incluso en este puede llegar a ser:"problemas de atributos del embebido" - "problema con Ruta absoluta - relativa"
adjunto codgo AS 2 y xml.
AS
//////////////// INITIAL VARS /////////////////////////////////////////////////////////////////////////////////
// Set first gallery displayed by default
_global.galleryNum = 0;
// Set first image displayed by default
_global.ID = 0;
// Set your document stage width and height here
var stageW = 800;
var stageH = 600;
// Set spacing amount between thumbnail images
var thumbSpace = 1;
// Set the maximum amount of thumbs to be displayed here. Scrolling will be enabled if total of thumbs is greater than default_maxThumbs
var default_maxThumbs = 7;
// Set border amount here
var border = 15;
menu_mc.bgX = menu_mc.bg._x;
// Set initial size of white bg here
destWidth = bg_mc.bg._width=400;
destHeight = bg_mc.bg._height=400;
// Alignment varibles
fullscreen_mcY = fullscreen_mc._y;
select_mcY = select_mc._y;
bgX = bg._x;
bgY = bg._y;
menu_mcX = menu_mc._x;
menu_mcY = menu_mc._y;
//////////////// BUILD GALLERY FUNCTION //////////////////////////////////////////////////////////////////////
buildGallery = function () {
_global.ID = 0;
destWidth = 0;
destHeight = 0;
//Remove previously created photos and thumbs
for (j=0; j<currentTotal; j++) {
menu_mc.scroll_mc.thumb_mc["thumb"+j].removeMovieClip();
}
total = xmlNode.childNodes[_global.galleryNum].childNodes.length;
galleryTotal = xmlNode.childNodes.length;
Folder = xmlNode.childNodes[_global.galleryNum].attributes.Folder;
maxThumbs = default_maxThumbs;
//Disable scrolling if too few thumbs
if (maxThumbs>total) {
maxThumbs = total;
}
// Sets destination width and height for each image
for (n=0; n<galleryTotal; n++) {
Name[n] = xmlNode.childNodes[n].attributes.Name;
select_mc.selectBttn_mc.selectBttn.duplicateMovieC lip("selectBttn"+n,n);
select_mc.selectBttn_mc["selectBttn"+n]._y = -select_mc.selectBttn_mc.selectBttn._height-(select_mc.selectBttn_mc.selectBttn._height)*n;
select_mc.selectBttn_mc["selectBttn"+n].txt_mc.txt.text = Name[n];
select_mc.selectBttn_mc["selectBttn"+n].ID = n;
}
for (i=0; i<total; i++) {
Thumb[i] = xmlNode.childNodes[galleryNum].childNodes[i].attributes.Thumb;
Large[i] = xmlNode.childNodes[galleryNum].childNodes[i].attributes.Large;
Caption[i] = xmlNode.childNodes[galleryNum].childNodes[i].attributes.Caption;
Colour[i] = xmlNode.childNodes[galleryNum].childNodes[i].attributes.Colour;
Copy[i] = xmlNode.childNodes[galleryNum].childNodes[i].childNodes[0].firstChild.nodeValue;
//Build thumb menu
menu_mc.scroll_mc.thumb_mc.thumb.duplicateMovieCli p("thumb"+i,i);
menu_mc.scroll_mc.thumb_mc["thumb"+i]._x = (menu_mc.scroll_mc.thumb_mc["thumb"+i]._width+thumbSpace)*i;
loadMovie(Folder+"/"+Thumb[i], menu_mc.scroll_mc.thumb_mc["thumb"+i].holder);
menu_mc.scroll_mc.thumb_mc["thumb"+i].ID = i;
menu_mc.scroll_mc.mask_mc._width = ((menu_mc.scroll_mc.thumb_mc.thumb._width+thumbSpa ce)*maxThumbs)-thumbSpace;
menu_mc.scroll_mc._x = Math.round(-(Stage.width-stageW)/2+Stage.width/2-menu_mc.scroll_mc.mask_mc._width/2);
//Reset scroll menu to first image on gallery load
menu_mc.scroll_mc.thumb_mc._x = 0;
menu_mc.scroll_mc.destX = 0;
}
loadID();
currentTotal = total;
};
////////////Thumnail menu and preloader script////////////
this.menu_mc.thumb_menu.destX = this.menu_mc.thumb_menu._x;
onEnterFrame = function () {
this.menu_mc.thumb_menu._x += (this.menu_mc.thumb_menu.destX-this.menu_mc.thumb_menu._x)/3;
hover.txt._width = hover.txt.textWidth+10;
hover.bg._width = hover.txt._width+10;
//Info show and hide
info_mc._alpha += (info_mc.destAlpha-info_mc._alpha)/3;
header_mc._alpha = info_mc._alpha;
loaded = holder.getBytesLoaded();
filesize = holder.getBytesTotal();
percentage = Math.round((loaded/filesize)*100);
// Preloader script
if (filesize == loaded && filesize>100) {
preloader.left.half._rotation = 180;
preloader.right.half._rotation = 180;
if (bg_mc.hitTest(_parent._xmouse, _parent._ymouse, true) && holder._alpha>=100) {
if (!bttnNext.hitTest(_parent._xmouse, _parent._ymouse, true) && !bttnPrev.hitTest(_parent._xmouse, _parent._ymouse, true)) {
info_mc.destAlpha = 100;
} else {
info_mc.destAlpha = 0;
}
} else {
info_mc.destAlpha = 0;
}
alignPic();
if (holder._alpha<100) {
holder._alpha += 5;
}
} else {
info_mc._alpha = 0;
info_mc.destAlpha = 0;
if (isNaN(percentage) or percentage == 0) {
percentage = 0;
preloader.left.half._rotation = 0;
preloader.right.half._rotation = 0;
} else if (percentage<=50 && percentage>0) {
preloader.left.half._rotation = 0;
preloader.right.half._rotation = (360/100)*percentage;
} else if (percentage>50 && percentage<100) {
preloader.left.half._rotation = (360/100)*(percentage-50);
preloader.right.half._rotation = 180;
}
}
preloader.percentageTxt = percentage;
};
//////////////// LOAD XML DATA //////////////////////////////////////////////////////////////////////
loadXML = function (loaded) {
if (loaded) {
xmlNode = this.firstChild;
Name = [];
Folder = [];
Thumb = [];
Large = [];
Caption = [];
Colour = [];
Copy = [];
select_mc.selectShow.txt_mc.txt.text = xmlNode.childNodes[_global.galleryNum].attributes.Name;
buildGallery();
} else {
trace("Error loading XML");
}
};
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("content.xml");
stop();
XML
<?xml version="1.0" encoding="ISO-8859-1" ?>
<content>
<gallery Name="All Photo's" Folder="Gallery1">
<image Thumb="thumb1.jpg" Large="image1.jpg" Caption="Trees by the lake" Colour="293640">
<copy><![CDATA[<p>This is HTML formatted text which can support <a href="http://www.flashden.net" target="_blank">hyperlinks</a>. You can also have special characters for example: âæèêíó. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor.</p>]]></copy>
</image>
<image Thumb="thumb2.jpg" Large="image2.jpg" Caption="Autumn River" Colour="181f0a">
<copy><![CDATA[<p>This is HTML formatted text which can support <a href="http://www.flashden.net" target="_blank">hyperlinks</a>. You can also have special characters for example: âæèêíó. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor.</p>]]></copy>
</image>
</gallery>
</content>
ojala puedan ayudarme alguien, de verdad que lo necesito!!!
MILLON DE GRACIAS DE ANTEMANO POR LA ATENCION AL TEMA