Code:
...
<style name="DelayHide" <!--delay after which the menu must be closed-->
keep="true"
onout="set(VisMenu, 0);
if(VisMenu == 0,
delayedcall(5, HideNav());
, ShowNav();)"
/>
...
<plugin name="Menu" <!--Menu button-->
keep="true"
align="bottom"
edge="left"
height="15%"
rotate="-90"
url="../builddata/graphics/strap.png"
onclick="if(VisMenu != 1, ShowNav(), HideNav();)"
/>
<plugin name="MenuIcon" <!--Icon of the Menu button-->
parent="Menu"
keep="true"
url="../builddata/graphics/icon_menu.png"
rotate="90"
align="center"
edge="center"
handcursor="true"
onclick="if(VisMenu != 1, ShowNav(), HideNav(););"
/>
<plugin name="Desk" <!--Background for navigation buttons-->
parent="Menu"
keep="true"
url="../builddata/graphics/desk.png"
align="left"
edge="right"
handcursor="true"
width="100"
height="250"
style="DelayHide"
/>
...
<!--BEG*************Menu buttons****************-->
<plugin name="in" parent= "desk" rotate="90" align="right" crop="0|0|65|65" height="prop" keep="true" ondown="set(fov_moveforce,-1);" onout=""
onhover="showtext(Zoom in, navstyle);" onovercrop="0|65|65|65" onup="set(fov_moveforce,0);" url="../builddata/graphics/menu/menu0.png"
width="40" y="-80" x="25"/>
<plugin name="out" parent= "desk" rotate="90" align="right" crop="0|0|65|65" height="prop" keep="true" ondown="set(fov_moveforce,+1);" onout=""
onhover="showtext(Zoom out, navstyle);" onovercrop="0|65|65|65" onup="set(fov_moveforce,0);" url="../builddata/graphics/menu/menu1.png"
width="40" y="-40" x="25"/>
...
<!--*************Menu buttons****************END-->
<action name="HideNav"> <!--Hide navigation-->
tween(plugin[Menu].y, 0, 1);
set(VisMenu, 0); <!--VisMenu - indicator of the open/close menu-->
</action>
<action name="ShowNav"> <!--Show navigation-->
tween(plugin[Menu].y, 85);
set(VisMenu, 1);
</action>
...
So, my problem is in "How to that the menu will be closed after 5 sec. (as example)" when the cursor left the Desk?
If I start this code, menu closes after 5 sec.that I would not do, because on the Desk are buttons and action HideNav starts when the cursor change his location from Desk to the button.
When I assigned the style "DelayHide" for buttons, the timer of delayedcall not stoped or reseted (as I thought).
When I wrote
...onhover="stoptween(plugin[menu].y);showtext(Zoom in, navstyle);"...
for buttons, the Menu, a little bit, slided down on each changing of the cursor location (button-button, desk-button).
If you knows tell please what's wrong?