# Using onRollout in XML menus

**URL:** <https://forum.kirupa.com/t/using-onrollout-in-xml-menus/157248>\
**Category:** flash\
**Created:** [July 31, 2005, 1:05pm UTC](https://forum.kirupa.com/t/using-onrollout-in-xml-menus/157248 "2005-07-31T13:05:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sleepyball](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@sleepyball](https://forum.kirupa.com/u/sleepyball)\
**Post date:** [July 31, 2005, 1:05pm UTC](https://forum.kirupa.com/t/using-onrollout-in-xml-menus/157248/1 "2005-07-31T13:05:19Z")

</div>

I’m working on a XML menu similar to the one in this tutorial:

[http://www.kirupa.com/developer/actionscript/xml\_dropdown\_menu.htm](http://www.kirupa.com/developer/actionscript/xml_dropdown_menu.htm)

I noticed that the submenus won’t disappear when the mouse isn’t on them unless the mouse button is pressed (onMouseUp). I tried modifying the Actionscript to correct this problem, but I can’t get it to work. How do you fix this problem?

Is there a way you could use something like…

Pseudocode:  
if(mouse arrow is visible)  
CloseSubmenus()
