Форум Flasher.ru
Ближайшие курсы в Школе RealTime
Список интенсивных курсов: [см.]  
  
Специальные предложения: [см.]  
  
 
Блоги Правила Справка Пользователи Календарь Сообщения за день
 

Вернуться   Форум Flasher.ru > Архив Flasher.ru > Flash > ActionScript

Версия для печати  Отправить по электронной почте    « Предыдущая тема | Следующая тема »  
Опции темы Опции просмотра
 
Создать новую тему  
Старый 03.10.2003, 16:01
SchneiH2 вне форума Посмотреть профиль Найти все сообщения от SchneiH2
  № 1  
SchneiH2

Регистрация: Oct 2003
Сообщений: 6
По умолчанию Pull down menu, working with paths

First of all: Sorry for writing in English, however, please answer in Russian, it's ok.

I use the below code to generate a pull down menu. In advance I'd like to say that it works as I want except one thing:

The menu consists of two MC:
btn_hm1 (i.e. main menu) and Submenu1.
In the least are embedded some buttons with rollover effect (change o font color).

The point ist that the all pull down/up effects work properly, however, the embedded buttons of the Submenu1 are inoperational (rollover effect does not function).

I found out that it is obviously to do with the path definitions (if I change from _root to _parent or other the pull down effect does not work any more)

What is wrong?

Her comes the code:

targetOben = 140
targetUnten = 180
speed = 4


btn_hm1.onrollover = function(){

_root.onEnterFrame = function() {

Submenu1._y += (targetUnten-Submenu1._y)/speed;

}//onEnterFrame

} //function btn_hm1.onrollover => works properly!!!


btn_hm1.onRollout = function(){

if (!(Submenu1.hitTest(_root._xmouse, _root._ymouse,false))) {

_root.onEnterFrame = function() {

Submenu1._y += (targetOben-Submenu1._y)/speed;

}//onEnterFrame

}//if

}//function btn_hm1.onrollout => works properly!!!


Submenu1.onRollout = function(){

_root.onEnterFrame = function() {

Submenu1._y += (targetOben-Submenu1._y)/speed;

}//onEnterFrame

} //function Submenu1.onrollout => works for "pull up", buttons inoperational

I have also noticed, that without the least function (Submenu1.onRollout) the buttons work whereas the "pull up"of Submenu does not work when "rollout" the Submenu1-area.


Thank you in advance for the help.

Regards

SHJ

Старый 03.10.2003, 22:43
sergwizard вне форума Посмотреть профиль Отправить личное сообщение для sergwizard Посетить домашнюю страницу sergwizard Найти все сообщения от sergwizard
  № 2  
sergwizard
 
Аватар для sergwizard

Регистрация: Jan 2002
Адрес: СПб-Denver-Лермонтов
Сообщений: 1,525
Насколько я тебя понял, “Submenu1” – это MovieClip с кнопками.
Но, как только ты пишешь: Submenu1.onRollout, ты тем самым превращаешь его в кнопку. А это значит, что кнопки в НЕМ становятся недоступными. Чтобы такой конфликт не происходил, не используй onRollOut для Submenu1. Вместо этого используй hitTest (точнее, его отсутствие).
__________________
Для того чтобы узнавать, есть два способа: - задавать вопросы и пытаться самому на них ответить. Второй способ более продуктивный.
(S.Wizard)

Старый 06.10.2003, 13:20
SchneiH2 вне форума Посмотреть профиль Найти все сообщения от SchneiH2
  № 3  
SchneiH2

Регистрация: Oct 2003
Сообщений: 6
Thank you for the answer! The reasons seems to be clear now.

However, I don't know how to trigger then this event.
I wrote some kind of function like this but I don'tknow how to trigger:

function HideSubmenu1 () {

if (!(Submenu1.hitTest(_root._xmouse, _root._ymouse, false))){

_root.onEnterFrame = function() {

Submenu1._y += (targetOben-Submenu1._y)/speed;

}//onEnterFrame

}//if


}

Answer in Russian is ok. Thanks in advance.

SHJ

Старый 07.10.2003, 00:01
sergwizard вне форума Посмотреть профиль Отправить личное сообщение для sergwizard Посетить домашнюю страницу sergwizard Найти все сообщения от sergwizard
  № 4  
sergwizard
 
Аватар для sergwizard

Регистрация: Jan 2002
Адрес: СПб-Denver-Лермонтов
Сообщений: 1,525
Could you show me your fla file? I hope I’ll be able to fix it up. If you don’t want to show it up here, you can send it to my email.
trunaev@lermus.ru
__________________
Для того чтобы узнавать, есть два способа: - задавать вопросы и пытаться самому на них ответить. Второй способ более продуктивный.
(S.Wizard)

Старый 07.10.2003, 11:21
SchneiH2 вне форума Посмотреть профиль Найти все сообщения от SchneiH2
  № 5  
SchneiH2

Регистрация: Oct 2003
Сообщений: 6
Please find the file as attachment (no problem to publish it).
Meanwhile, I think to have solved the problem partly by using the following code for the function under question:

Submenu1.Blind.onrollout = function() {

_root.onEnterFrame = function() {
Submenu1._y += (targetOben-Submenu1._y)/speed;
};
};

With "Submenu1.Blind.onrollout" I call either one of the buttons embedded in the Submenu1 or, as shown currently, I try to access a hotspot to cover the whole area of the Submenu1.
The problem now is how to use this hotspot correctly. If it is put in a layer above the Submenu1-buttons, the least are inoperational. The opposite case (hotspot layer below button layer) leads into the problem that the whole Submenu is flashing or even disappearing when rolling over to another button within it. (in this case the hotspot is inoperational)
Sorry, if this sounds a bit unclear but I think looking into attached file makes the situation clear.

Thanks in advance for the efforts and help.

Regards

SHJ
Вложения
Тип файла: zip pulldownmenu.zip (5.4 Кб, 189 просмотров)

Старый 07.10.2003, 17:23
SchneiH2 вне форума Посмотреть профиль Найти все сообщения от SchneiH2
  № 6  
SchneiH2

Регистрация: Oct 2003
Сообщений: 6
Hurra! Now it works!

For those who are interested in the result see attached ZIP.

Bolshoe spasibo to all who helped me!

Do sleduyushevo voprosa!

SHJ
Вложения
Тип файла: zip pulldownmenu.zip (5.4 Кб, 206 просмотров)

Создать новую тему   Часовой пояс GMT +4, время: 23:13.
Быстрый переход
  « Предыдущая тема | Следующая тема »  

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.


 


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


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