![]() |
|
||||||||||
|
|||||
|
я скора здохну... Помогите кто нить, плз... Суть вот в чем есть выпадающее меню:
Сезон 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;
}
К такой каше нужен исходник так что приляпываю оный... |
![]() |
Часовой пояс GMT +4, время: 10:49. |
|
|
« Предыдущая тема | Следующая тема » |
|
|