![]() |
|
||||||||||
|
|||||
|
Регистрация: Jul 2005
Сообщений: 9
|
Доброго времени суток.Я во Flash'e не давно и мне нужна помощ.Заранее благодарен(только не посчитайте за баг) ,что делает этот код:
onClipEvent(load) { // check style preference if (_parent.style.toUpperCase() == "AUTO") { playerVersion = getVersion(); _parent.platform = playerVersion.substr(0, 3); } else { _parent.platform = _parent.style.toUpperCase(); } // create methods for the parent class _parent.child = this; _parent.getLabel = function () { return child.label; } _parent.getState = function () { return child.checked; } _parent.isRadioButton = function () { return true; } _parent.setLabel = function (label) { child.label = label; } _parent.setState = function (state) { if (state) { // turn off all of the buttons for (var tmp = head; tmp != null; tmp = tmp.next) tmp.setState(false); // now turn on ours if (platform == "MAC") { child.gotoandstop(4); } else { child.gotoandstop(2); } } else { if (platform == "MAC") { child.gotoandstop(3); } else { child.gotoandstop(1); } } child.checked = state; } // set the initial state stop(); label = _parent.label; _parent.head = _parent; // make our parent the start _parent.head.next = null; // init the next ptr to null var obj = _parent._parent; // point to the object where the radio butons are instattiated // link all of the radio buttons for (var i in obj) { // check to see that the container is a radio button // and make sure the container is not our container if (obj[i].isRadioButton() && obj[i] != _parent) { var rButton = obj[i]; rButton.head = this._parent; rButton.next = _parent.head.next; _parent.head.next = rButton; } } if (_parent.checked.toLowerCase() == "true") { _parent.setState(true); } else { _parent.setState(false); } } onClipEvent(mouseDown) { if (hitTest(_root._xmouse, _root._ymouse, false)) { if (_parent.getState()) { _parent.setState(false); } else { _parent.setState(true); } updateAfterEvent(); } } |
![]() |
Часовой пояс GMT +4, время: 07:02. |
|
|
« Предыдущая тема | Следующая тема » |
| Опции темы | |
| Опции просмотра | |
|
|