No announcement yet.

How do I create a submenu?

This topic is closed.
  • Filter
  • Time
  • Show
Clear All
new posts

  • How do I create a submenu?

    I want to create something like a submenu with AMS. It should work in one of two ways:

    1) If the mouse is moved over a certain text object, some other text objects, representing the the submenu items, should appear below it and stay visible when the mouse is moved down to them. If the mouse is moved somewehre else, they should disappear again.


    2) The submenu items appear when the text object is *clicked* and disappear when it's clicked again.

    I have tried several ways to accomplish this, but I couldn't get it to work properly. I tried using a true/false variable acting as a visibility flag, but I would have to toggle its value each time the subitem changes, and to do this I would need something like an IF/THEN/ELSE command.

    My temporary solution is to resize the main item's bounding box so that it covers all the subitems. Then I use the mouseover/mouseleave method and as the mouse never really leaves the main item, the subitems stay visible. However I am not happy with this solution, because the subitems also appear if the mouse enters the bounding box from the sides or from below. This is confusing for the end user and as I intend to place several main items below each other, this would lead to conflicts.

    Any ideas?

    [This message has been edited by case (edited 11-10-2000).]

  • #2
    Re: How do I create a submenu?

    I've continued experimenting a bit and found an acceptable, though quite complicated solution:

    I assigned "Show Object" commands to the "Mouse Over" tab of the main menu item, so that all subitems become visible when the mouse is moved over the main item.
    Then, instead of expanding the main items bounding box, I surrounded the whole menu with four empty text objects. They have "Mouse Over" actions defined to hide all subitems. Their purpose is to act as a "tripwire" so that the subitems vanish as soon as the mouse leaves the menu area.

    If no one comes up with a much easier solution (did I mention that I don't want to use multiple pages? ), this will hopefully help others who want to do something similar.

    [This message has been edited by case (edited 11-11-2000).]


    • #3
      Re: How do I create a submenu?

      You seem to have the right idea, but to make it easier instead of four empty text areas, as you have said, make one hyperlink that covers the main as well as the sub menu areas, then set the hyperlink Properties so that the Mouse Leave action will hide your submenu, this way you only have one object, (the hyperlink), to set up, not four. If you're going to have more than one item in the main menu, don't forget to set each one to hide all other submenu items except the items that are suppose to show when the mouse is over them or clicked, which ever route you use.