Просмотр полной версии : Не видит xml файл.Проблема с уровнями
Доброго времени суток.
столкнулся с такой проблемой.
есть галлерея которая работает через xml.
я ее помещаю во внутрь мувиклипа. при запуске она не видит xml файла.
как я понял тут проблема в рутах но на что их исправить я так и не разобрался . вот тут исходник (http://demiart.ru/forum/index.php?act=Attach&type=post&id=426951) с работающей и вложенной в мувик.
помогите разобраться как правильно сделать
заранее благодарен
amexdesign
22.01.2009, 01:11
как я понял тут проблема в рутах но на что их исправить я так и не разобрался
совершенно верно... уберите во всем коде ссылки на _root. вот пример из вашего кода:
_root.description = new Array();
_root.small_image = new Array();
_root.big_image = new Array();
_root.total_images = 0;
initGallery();
var fullscreenCM = new ContextMenu(menuHandler);
fullscreenCM.hideBuiltInItems();
var fs = new ContextMenuItem("Go Full Screen", goFullScreen);
fullscreenCM.customItems.push(fs);
var xfs = new ContextMenuItem("Exit Full Screen", exitFullScreen);
fullscreenCM.customItems.push(xfs);
_root.menu = fullscreenCM;
downloadButton._visible = false;
_root.small_image[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
_root.big_image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
_root.description[i] = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue;
сделайте вот так:
description = new Array();
small_image = new Array();
big_image = new Array();
total_images = 0;
var fullscreenCM = new ContextMenu(menuHandler);
fullscreenCM.hideBuiltInItems();
var fs = new ContextMenuItem("Go Full Screen", goFullScreen);
fullscreenCM.customItems.push(fs);
var xfs = new ContextMenuItem("Exit Full Screen", exitFullScreen);
fullscreenCM.customItems.push(xfs);
_root.menu = fullscreenCM;
downloadButton._visible = false;
small_image[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
big_image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
description[i] = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue;
и так весь код лежащий в этом мувике
Работает на vBulletin ® версия 3.7.3. Copyright ©2000-2026, Jelsoft Enterprises Ltd. Перевод: zCarot
Copyright © 1999-2008 Flasher.ru. All rights reserved.