![]() |
|
||||||||||
|
|||||
|
Регистрация: Oct 2003
Сообщений: 6
|
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 |
|
|||||
|
Регистрация: Jan 2002
Адрес: СПб-Denver-Лермонтов
Сообщений: 1,525
|
Насколько я тебя понял, “Submenu1” – это MovieClip с кнопками.
Но, как только ты пишешь: Submenu1.onRollout, ты тем самым превращаешь его в кнопку. А это значит, что кнопки в НЕМ становятся недоступными. Чтобы такой конфликт не происходил, не используй onRollOut для Submenu1. Вместо этого используй hitTest (точнее, его отсутствие).
__________________
Для того чтобы узнавать, есть два способа: - задавать вопросы и пытаться самому на них ответить. Второй способ более продуктивный. (S.Wizard) |
|
|||||
|
Регистрация: 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 |
|
|||||
|
Регистрация: 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) |
|
|||||
|
Регистрация: 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 |
|
|||||
|
Регистрация: 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 |
![]() |
Часовой пояс GMT +4, время: 20:18. |
|
|
« Предыдущая тема | Следующая тема » |
|
|