Форум Flasher.ru

Форум Flasher.ru (http://www.flasher.ru/forum/index.php)
-   ActionScript 1.0/2.0 (http://www.flasher.ru/forum/forumdisplay.php?f=93)
-   -   Nugna pomosh po Action Script (http://www.flasher.ru/forum/showthread.php?t=67413)

valeo 02.08.2005 18:37

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();
}
}

KidsKilla 02.08.2005 18:57

никакого желания искать непонятную ошибку в ворохе кода.
определи точнее что не так.
если просто нужно сказать что делает код, то вставь во флэш и проверь.

K.A.T.A.F.A.L.K.E.R 02.08.2005 19:05

Видишь строчки со значками "//"? Вот в них о объясняется кто что делает :) А вообще - действительно... Много текста. :o

valeo 03.08.2005 10:16

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
Администрация сайта не несёт ответственности за любую предоставленную посетителями информацию. Подробнее см. Правила.