Форум Flasher.ru
Ближайшие курсы в Школе RealTime
Список интенсивных курсов: [см.]  
  
Специальные предложения: [см.]  
  
 
Блоги Правила Справка Пользователи Календарь Поиск рулит! Сообщения за день Все разделы прочитаны
 

Вернуться   Форум Flasher.ru > Flash > ActionScript 1.0/2.0

Версия для печати  Отправить по электронной почте    « Предыдущая тема | Следующая тема »  
Опции темы Опции просмотра
 
Создать новую тему  
Старый 03.04.2011, 14:49
ilikali вне форума Посмотреть профиль Отправить личное сообщение для ilikali Найти все сообщения от ilikali
  № 1  
ilikali

Регистрация: Mar 2010
Сообщений: 34
По умолчанию ХМЛ Галерея

Здравствуйте еще раз в предыдущей теме мне никто не помог. Поэтому решил конкретизировать вопрос. Есть клип с Linkage (тоесть не Instance name) photobase. в него грузиться thumbs (из XML). Вот код клипа
Код AS1/AS2:
    btn.onRelease = function () {
        _parent._parent.infos.title.htmlText = title;
		_parent._parent.infos.name.htmlText = name;
		_parent._parent.infos.born.htmlText = born;
		_parent._parent.infos.position.htmlText = position;
		_parent._parent.infos.nomer.htmlText = nomer;
		_parent._parent.infos.p_team.htmlText = p_team;
		_parent._parent.infos.join_absheron.htmlText = join_absheron;
		_parent._parent.infos.anket.htmlText = anket;
        _parent._parent.chosedPhoto = photoValue;
        _global.loadMedia(big);
    };
Чтобы все было понятно infos это клип каторый грузиться в лайтбоксе (при нажатии на photobase). а вот код самой галереи
Код AS1/AS2:
    var buildMenu_SI;
    xmlLoader = "Loading ";
    projXML = new XML();
    projXML.ignoreWhite = true;
    projXML.onLoad = function (_arg3) {
        if (_arg3) {
            listNumbers = list.childNodes.length;
            var _local2 = this.firstChild.childNodes;
            Ima = this.firstChild.childNodes[0].childNodes;
            listNumbers = Ima.length;
            e = 0;
            buildGallery_SI = setInterval(buildGallery, 50);
            buildList_SI = setInterval(buildList, 150);
        }
    };
    xmlLoader = "";
    projXML.load("data/xml/gallery2.xml");
    var itemSelectedList = 1;
    var itemHeightList = 71;
    down_btn._visible = false;
    up_btn._visible = false;
    down_btn.onRelease = function () {
        itemSelectedList++;
        slideList();
    };
    up_btn.onRelease = function () {
        itemSelectedList--;
        slideList();
    };
 
 
    function buildGallery() {
        if (i < Ima[gallerySelected].childNodes.length) {
            _local1.loader.attachMovie("photobase", "photobase" + i, i);
            _local1.loader["photobase" + i]._x = (column * 95) - 95;
            _local1.loader["photobase" + i]._y = (row * 130) - 130;
			_local1.loader["photobase" + i].title = Ima[gallerySelected].childNodes[i].attributes.title;
			_local1.loader["photobase" + i].name = Ima[gallerySelected].childNodes[i].attributes.name;
			_local1.loader["photobase" + i].born = Ima[gallerySelected].childNodes[i].attributes.born;
			_local1.loader["photobase" + i].position = Ima[gallerySelected].childNodes[i].attributes.position;
			_local1.loader["photobase" + i].nomer = Ima[gallerySelected].childNodes[i].attributes.nomer;
			_local1.loader["photobase" + i].p_team = Ima[gallerySelected].childNodes[i].attributes.p_team;
			_local1.loader["photobase" + i].join_absheron = Ima[gallerySelected].childNodes[i].attributes.join_absheron;
			_local1.loader["photobase" + i].anket = Ima[gallerySelected].childNodes[i].attributes.anket;
 
 
            _local1.loader["photobase" + i].big = Ima[gallerySelected].childNodes[i].attributes.big;
            _local1.loader["photobase" + i].photoValue = i;
            pathThumb = _local1.loader["photobase" + i].ico_image;
 
 
 
            _local1.loader["photobase" + i].photoValue = i;
            loadThumb(Ima[gallerySelected].childNodes[i].attributes.thumb);
            myTween = new mx.transitions.Tween(_local1.loader["photobase" + i], "_alpha", mx.transitions.easing.Strong.easeOut, 0, 100, 40, false);
            if (column < 7) {
                column++;
            } else {
                column = 1;
                row++;
            }
            i++;
        } else {
            clearInterval(buildGallery_SI);
            checkBtn();
            CheckTitle();
        }
    }
    function Remove() {
        a = Ima[gallerySelected].childNodes.length;
        removeGallery_SI = setInterval(removeGallery, 40);
        itemSelected = 1;
        var _local1 = new mx.transitions.Tween(loader, "_y", mx.transitions.easing.Strong.easeOut, getProperty(loader, _y), ((-(itemHeight * itemSelected)) + itemHeight) + 40, 14, false);
        btn_up_.enabled = false;
        btn_up_._alpha = 0;
        btn_down_.enabled = false;
        btn_down_._alpha = 0;
    }
    function removeGallery() {
        if (a >= 0) {
            _local1.loader["photobase" + a].removeMovieClip();
            a--;
        } else {
            clearInterval(removeGallery_SI);
            i = 0;
            column = 1;
            row = 1;
            buildGallery_SI = setInterval(buildGallery, 50);
        }
    }
    function checkBtn() {
        if (row > 3) {
            btn_up_.enabled = false;
            btn_up_._alpha = 0;
            btn_down_.enabled = true;
            btn_down_._alpha = 100;
        }
    }
    function slideItem() {
        if (itemSelected == 1) {
            btn_up_.enabled = false;
            btn_up_._alpha = 0;
            btn_down_.enabled = true;
            btn_down_._alpha = 100;
        } else if (itemSelected >= (Math.ceil(Ima[gallerySelected].childNodes.length / 5) - 2)) {
            btn_down_.enabled = false;
            btn_down_._alpha = 0;
            btn_up_.enabled = true;
            btn_up_._alpha = 100;
        } else {
            btn_down_.enabled = true;
            btn_down_._alpha = 100;
            btn_up_.enabled = true;
            btn_up_._alpha = 100;
        }
        var _local1 = new mx.transitions.Tween(loader, "_y", mx.transitions.easing.Strong.easeOut, getProperty(loader, _y), ((-(itemHeight * itemSelected)) + itemHeight) + 40, 14, false);
    }
    function Align() {
        xpos = Stage.width;
        ypos = Stage.height;
        infos._x = -_parent.sectionHolder._x;
        infos._y = (Stage.height - 25) - _parent.sectionHolder._y;
        btn_left._x = 0;
        btn_left._y = ((Stage.height - _parent.sectionHolder._y) / 2) - 150;
        btn_right._x = ((Stage.width - _parent.sectionHolder._x) - 36) - _parent.sectionHolder._x;
        btn_right._y = ((Stage.height - _parent.sectionHolder._y) / 2) - 150;
        bg.imaLoader._x = ((Stage.width / 2) - (bg.imaLoader._width / 2)) - _parent.sectionHolder._x;
        bg.imaLoader._y = ((Stage.height / 2) - (bg.imaLoader._height / 2)) - _parent.sectionHolder._y;
    }
    function lightboxStage(_arg3) {
        if (_arg3 == true) {
            var _local2 = new mx.transitions.Tween(lightBox, "_alpha", mx.transitions.easing.Strong.easeOut, getProperty(lightBox, _alpha), 95, 15, false);
            lightBox._visible = true;
            lightBox.enabled = true;
            new mx.transitions.Tween(infos, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 100, 1, true);
            lightBox.onRollOver = function () {
                new mx.transitions.Tween(_root.clicker, "_alpha", mx.transitions.easing.Strong.easeOut, getProperty(_root.clicker, _alpha), 100, 0.5, true);
 
            };
            lightBox.onRollOut = function () {
                new mx.transitions.Tween(_root.clicker, "_alpha", mx.transitions.easing.Strong.easeOut, getProperty(_root.clicker, _alpha), 0, 0.5, true);
            };
            _local2.onMotionFinished = function () {
                black_bg_open = true;
                lightBox.onRelease = function () {
                    lightboxStage(false);
                };
            };

Создать новую тему   Часовой пояс GMT +4, время: 02:38.
Быстрый переход
  « Предыдущая тема | Следующая тема »  
Опции темы
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.


 


Часовой пояс GMT +4, время: 02:38.


Copyright © 1999-2008 Flasher.ru. All rights reserved.
Работает на vBulletin®. Copyright ©2000 - 2024, Jelsoft Enterprises Ltd. Перевод: zCarot
Администрация сайта не несёт ответственности за любую предоставленную посетителями информацию. Подробнее см. Правила.