Всем привет! Вопрос простой, но никак не могу разобраться...
Есть рабочая фотогаллерея на XML.
Проблема в следующем: когда я ложу эту галерею в мувиклип (чтобы загружать в сайт), основные фотки не грузятся.....только предосмотр.
Пробовал менять _root на _parent. Не помогает.
Заранее спасибо!

PHP код:
function loadGeneralXML(loaded)
{
if (loaded)
{
theRootNode = this.firstChild;
theTitle = theRootNode.childNodes[0].childNodes[0].nodeValue;
displayTitle(theTitle);
_root.thumbnailEffect = theRootNode.childNodes[1].childNodes[0].nodeValue;
_root.largeImageEffect = theRootNode.childNodes[2].childNodes[0].nodeValue;
rightBtn.theColor = leftBtn.theColor = theRootNode.childNodes[3].childNodes[0].nodeValue;
rightBtn.theRolloverColor = leftBtn.theRolloverColor = theRootNode.childNodes[4].childNodes[0].nodeValue;
stageBackgroundColor = theRootNode.childNodes[5].childNodes[0].nodeValue;
borderColor = theRootNode.childNodes[6].childNodes[0].nodeValue;
galleryBackgroundColor = theRootNode.childNodes[7].childNodes[0].nodeValue;
_root.imageBorderColor = theRootNode.childNodes[8].childNodes[0].nodeValue;
showBackgroundImage = theRootNode.childNodes[9].childNodes[0].nodeValue;
if (showBackgroundImage.toUpperCase() == "YES")
{
bgImage._visible = true;
}
myColor = new Color(leftBtn);
myColor.setRGB("0x" + leftBtn.theColor);
leftBtn.onRollOver = function ()
{
myColor = new Color(this);
myColor.setRGB("0x" + this.theRolloverColor);
}
;
leftBtn.onRollOut = function ()
{
myColor = new Color(this);
myColor.setRGB("0x" + this.theColor);
}
;
myColor = new Color(rightBtn);
myColor.setRGB("0x" + rightBtn.theColor);
rightBtn.onRollOver = function ()
{
myColor = new Color(this);
myColor.setRGB("0x" + this.theRolloverColor);
}
;
rightBtn.onRollOut = function ()
{
myColor = new Color(this);
myColor.setRGB("0x" + this.theColor);
}
;
myColor = new Color(_root.stageBg);
myColor.setRGB("0x" + stageBackgroundColor);
myColor = new Color(galleryBorder);
myColor.setRGB("0x" + borderColor);
myColor = new Color(galleryBg);
myColor.setRGB("0x" + galleryBackgroundColor);
myColor = new Color(largeImageBg);
myColor.setRGB("0x" + _root.imageBorderColor);
}
}
function displayPage()
{
var originY = mc_thumbnail._y;
delete rightBtn.onEnterFrame;
delete leftBtn.onEnterFrame;
xml = myXML2.firstChild;
var __reg4 = xml.childNodes.length;
var __reg5 = 5;
var __reg6 = Math.floor(__reg4 / __reg5);
var __reg7 = __reg4 % 10;
var maxRightClickTime = 0;
if (__reg7 == 0)
{
maxRightClickTime = __reg6 - 1;
}
else
{
maxRightClickTime = __reg6;
}
var leftClickTime = 0;
var rightClickTime = 0;
var currentTarget = 0;
leftBtn._visible = false;
if (__reg4 <= __reg5)
{
rightBtn._visible = false;
}
else
{
rightBtn._visible = true;
}
currentTarget = 0;
rightBtn.onRelease = function ()
{
leftBtn._visible = true;
++rightClickTime;
if (rightClickTime == maxRightClickTime)
{
rightBtn._visible = false;
}
currentTarget = originY - (mask._height + _root.gapH) * rightClickTime;
this.onEnterFrame = function ()
{
diff = currentTarget - mc_thumbnail._y;
mc_thumbnail._y = mc_thumbnail._y + diff / 4;
}
;
}
;
leftBtn.onRelease = function ()
{
rightBtn._visible = true;
--rightClickTime;
++leftClickTime;
if (rightClickTime == 0)
{
leftBtn._visible = false;
}
currentTarget = originY - (mask._height + _root.gapH) * rightClickTime;
this.onEnterFrame = function ()
{
diff = currentTarget - mc_thumbnail._y;
mc_thumbnail._y = mc_thumbnail._y + diff / 4;
}
;
}
;
var __reg3 = 0;
while (__reg3 < __reg4)
{
thumbPath[__reg3] = xml.childNodes[__reg3].childNodes[0].childNodes[0].nodeValue;
picPath[__reg3] = xml.childNodes[__reg3].childNodes[1].childNodes[0].nodeValue;
link[__reg3] = xml.childNodes[__reg3].childNodes[2].childNodes[0].nodeValue;
desc[__reg3] = xml.childNodes[__reg3].childNodes[3].childNodes[0].nodeValue;
mc_thumbnail.img.duplicateMovieClip("img" + __reg3, __reg3);
mc_thumbnail["img" + __reg3]._y = mc_thumbnail.img._y + __reg3 * (mc_thumbnail.img._height + _root.gapH);
if (thumbPath[__reg3] == "undefined")
{
mc_thumbnail["img" + __reg3].enabled = false;
}
else
{
mc_thumbnail["img" + __reg3].enabled = true;
mc_thumbnail["img" + __reg3].img_mc.loadMovie(thumbPath[__reg3]);
}
mc_thumbnail["img" + __reg3].thePicPath = picPath[__reg3];
mc_thumbnail["img" + __reg3].theLinkURL = link[__reg3];
mc_thumbnail["img" + __reg3].theDesc = desc[__reg3];
++__reg3;
}
mc_thumbnail.img._visible = false;
displayImage(picPath[0], link[0], desc[0]);
}
function displayImage(thePicPath, link, desc)
{
_root.theBigImageContainer = _root.main.big_mc.big_mc_image;
_root.theBigImageContainer.loadMovie(thePicPath);
_root.theBigImageContainer._alpha = 0;
var __reg3 = this.createEmptyMovieClip("container", this.getNextHighestDepth());
__reg3.onEnterFrame = function ()
{
if (_root.theBigImageContainer.getBytesLoaded() == _root.theBigImageContainer.getBytesTotal() && _root.theBigImageContainer.getBytesTotal() != 4)
{
delete this.onEnterFrame;
_root.main.changeColor();
_root.theBigImageContainer._alpha = 100;
}
}
;
_root.main.big_mc.onRelease = function ()
{
getURL(link, "_blank");
}
;
if (link == undefined)
{
_root.main.big_mc.enabled = false;
}
else
{
_root.main.big_mc.enabled = true;
}
displayDesc(desc);
}
function changeColor()
{
if (_root.largeImageEffect.toUpperCase() == "ON")
{
var colorComponent = 500;
onEnterFrame = function ()
{
myColor = new Color(_root.main.big_mc.big_mc_image);
myColTr = new Object();
colorComponent = colorComponent + (100 - colorComponent) / 10;
myColTr = {ra: colorComponent, ga: colorComponent, ba: colorComponent};
myColor.setTransform(myColTr);
if (Math.round(colorComponent) == 100)
{
delete this.onEnterFrame;
colorComponent = 500;
}
}
;
}
}
function displayDesc(theSiteDesc)
{
if (theSiteDesc == undefined)
{
_root.main.textbox_desc._visible = false;
return;
}
_root.main.textbox_desc._visible = true;
_root.main.textbox_desc.html = true;
_root.main.textbox_desc.htmlText = theSiteDesc;
}
function displayTitle(theTitle)
{
if (theTitle == undefined)
{
_root.main.txtTitle._visible = false;
return;
}
_root.main.txtTitle._visible = true;
_root.main.txtTitle.html = true;
_root.main.txtTitle.htmlText = "<b>" + theTitle + "</b>";
}
bgImage._visible = false;
var generalXML = new XML();
generalXML.ignoreWhite = true;
var theXMl = "general.xml";
if (_root.flashVars != undefined)
{
theXMl = _root.flashVars;
}
generalXML.load(theXMl);
generalXML.onLoad = loadGeneralXML;
var myXML2 = new XML();
myXML2.ignoreWhite = true;
myXML2.load("gallery.xml");
var thumbPath = Array();
var picPath = Array();
var link = Array();
var desc = Array();
_root.gapH = 17.55;
myXML2.onLoad = function (success)
{
displayPage();
}
;