Форум 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)
-   -   Выпадающее меню (http://www.flasher.ru/forum/showthread.php?t=100042)

Sovnarkom 17.08.2007 20:32

Выпадающее меню
 
Вложений: 1
я скора здохну... Помогите кто нить, плз... Суть вот в чем есть выпадающее меню:
Сезон 1
Сезон 2
Сезон 3
Нажали на сезон 1 - сезон 2 и 3 уехали вниз. Нажали на сезон 2 сначала сезон 2 и 3 уехали наверх а потом сезон 3 поехал вниз.
Можно было б и без обратного хода, но я сцуко капризный!
Код у меня странный малеха, но какой есть:
Код:

i=0;// цифирь для определения какой пункт мню выбран
k=2;// цифирь для определения скока раз жамкали на пункт меню, т.е. он должен закр или откр
l=2;// the same
m=2;// the same

seasons.spring.onPress = function () {
        k = k + 1;
        a = Math.floor(k/2);
        if (i==0) {
        if (k/a == 2){
                seasons.gotoAndPlay (11);
        }
        else{
                seasons.gotoAndPlay (2);
        }
        }
        if (i==1 and l/Math.floor(l/2) == 2) {
                trace (i);
                seasons.gotoAndPlay(31);
                seasons.stop();
        var id=setInterval(function(){seasons.play();clearInterval(id)},300);
                seasons.gotoAndPlay(2);
                k=2;
        }
        if (i==2) {
                seasons.gotoAndPlay(51);
                seasons.stop();
        var id=setInterval(function(){seasons.play();clearInterval(id)},300);
                seasons.gotoAndPlay(2);
                k=2;
        }
        i=0;
}
seasons.summer.onPress = function () {
        l = l + 1;
        b = Math.floor(l/2);
        if (i==0) {
                seasons.gotoAndPlay(11);
                seasons.stop();
        var id=setInterval(function(){seasons.play();clearInterval(id)},300);
                seasons.gotoAndPlay(21);
                l=2;
        }
        if (i==1){
                if (l/b == 2){
                        seasons.gotoAndPlay (31);
                }
                else{
                        seasons.gotoAndPlay (21);
                }
        }
        if (i==2) {
                seasons.gotoAndPlay(51);
                seasons.stop();
        var id=setInterval(function(){seasons.play();clearInterval(id)},300);
                seasons.gotoAndPlay(21);
                l=2;
        }
        i=1;
}
seasons.autumn.onPress = function () {
        m = m + 1;
        c = Math.floor(m/2);
        if (i==0) {
                trace (i);
                seasons.gotoAndPlay(11);
                seasons.stop();
        var id=setInterval(function(){seasons.play();clearInterval(id)},300);
                seasons.gotoAndPlay(41);
                m = 2;
        }
        if (i==1) {
                seasons.gotoAndPlay(51);
                seasons.stop();
        var id=setInterval(function(){seasons.play();clearInterval(id)},300);
                seasons.gotoAndPlay(41);
                m = 2;
        }
        if (i==2){
                if (m/c == 2){
                        seasons.gotoAndPlay (51);
                }
                else{
                        seasons.gotoAndPlay (41);
                }
        }
        i=2;
}

тута есть лажа местами, типа недоделан третий сезон, но мне бы чтоб первые два заработали...

К такой каше нужен исходник так что приляпываю оный...

Sovnarkom 17.08.2007 20:33

С нетерпением жду вопросов и советов а то надо поскорее это закончить....

Sovnarkom 18.08.2007 03:19

эй!!! Кто нибудь!!!!!!!!!

udaaff 18.08.2007 03:48

Это действительно каша, дописывать её врядли кто то будет, проще это все удалить и по новой написать так как надо.

etc 18.08.2007 11:40

Sovnarkom получает плюс за ап и бессмысленный пост. Имейте ввиду, что у вас уже два плюса и третьего не будет — будет бан.


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

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