DVK
06.10.2012, 17:28
В темплейде в экшен скрипте реализовано меню через xml.
Подскажите пожалуйста что такое __reg4?
Вот часть кода:
_this.attachMovie("mainNav", "mainButton_" + __reg4, __reg4);
_this["mainButton_" + __reg4].menutxt.text = this.firstChild.childNodes[__reg4].attributes.label;
_this["mainButton_" + __reg4].goto = this.firstChild.childNodes[__reg4].attributes.goto;
_this["mainButton_" + __reg4].link = this.firstChild.childNodes[__reg4].attributes.link;
_this["mainButton_" + __reg4].audio = this.firstChild.childNodes[__reg4].attributes.audio;
_this["mainButton_" + __reg4].swfTitle = this.firstChild.childNodes[__reg4].attributes.swfAddress;
_this["mainButton_" + __reg4]._y = 60; // И еще интересует вот эта строка, так как она отвечает за координаты строки меню. Можно ли ее как не будь вставить в твиненр что б строка была с анимацией движения???
if (__reg4 == 0)
{
_this["mainButton_" + __reg4]._x = 0;
}
else
{
_this["mainButton_" + __reg4]._x = _this["mainButton_" + (__reg4 - 1)]._x + _this["mainButton_" + (__reg4 - 1)]._width;
}
Подскажите пожалуйста что такое __reg4?
Вот часть кода:
_this.attachMovie("mainNav", "mainButton_" + __reg4, __reg4);
_this["mainButton_" + __reg4].menutxt.text = this.firstChild.childNodes[__reg4].attributes.label;
_this["mainButton_" + __reg4].goto = this.firstChild.childNodes[__reg4].attributes.goto;
_this["mainButton_" + __reg4].link = this.firstChild.childNodes[__reg4].attributes.link;
_this["mainButton_" + __reg4].audio = this.firstChild.childNodes[__reg4].attributes.audio;
_this["mainButton_" + __reg4].swfTitle = this.firstChild.childNodes[__reg4].attributes.swfAddress;
_this["mainButton_" + __reg4]._y = 60; // И еще интересует вот эта строка, так как она отвечает за координаты строки меню. Можно ли ее как не будь вставить в твиненр что б строка была с анимацией движения???
if (__reg4 == 0)
{
_this["mainButton_" + __reg4]._x = 0;
}
else
{
_this["mainButton_" + __reg4]._x = _this["mainButton_" + (__reg4 - 1)]._x + _this["mainButton_" + (__reg4 - 1)]._width;
}