![]() |
Nugna pomosh po Action Script
Доброго времени суток.Я во Flash'e не давно и мне нужна помощ.Заранее благодарен(только не посчитайте за баг) ,что делает этот код: :D
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(); } } |
никакого желания искать непонятную ошибку в ворохе кода.
определи точнее что не так. если просто нужно сказать что делает код, то вставь во флэш и проверь. |
Видишь строчки со значками "//"? Вот в них о объясняется кто что делает :) А вообще - действительно... Много текста. :o
|
Spasibo K.A.T.A.F.A.L.K.E.R i KidsKilla poprobu razobratsya,v budushem takih razmerov ne budet ,Vsem udachi :)
|
| Часовой пояс GMT +4, время: 05:46. |
Copyright © 1999-2008 Flasher.ru. All rights reserved.
Работает на vBulletin®. Copyright ©2000 - 2026, Jelsoft Enterprises Ltd. Перевод: zCarot
Администрация сайта не несёт ответственности за любую предоставленную посетителями информацию. Подробнее см. Правила.