Downloads Upgrades     Store Support About
 

Productivity & Graphics Site

Macintosh

Windows

StuffIt

Graphics

Utilities

Aquazone

Mobile

Content Paradise


Quick View Other Tutorials   

Build a Pop-Up Menu Using Variables

For MotionArtist 3 or 4

Pop-up menus are all over the Web. Here's how to build your own!The variables supported in MotionArtist 3 and 4 allow you to hide and reveal graphic elements based on mouseovers- combined with MotionArtist's ability to link graphic objects to URLs or pages in a SWF presentation, this allows users to build pop-up or drop-down navigation menus quickly and easily. In this tutorial we'll walk through the process of building a simple drop-down menu.

1. Create your page with any graphics you'll want; set up a text object to use as a menu title. Right-click on the text object and choose Properties; in the Properties dialog, click the Variable button.

2. In the Variable Settings dialog, click the Set Value when Rolled-over checkbox; then click the Settings button.

3. If you're using MotionArtist 4, you'll be taken directly to another Variable Settings dialog, in which you can assign settings to the default Variable1.

In MA3 you'll see a List of Variable Settings dialog, with no entries. In the List of Variable Settings dialog, click Add and you'll get the dialog with settings for 'Variable1'

Use the List of Variables button to rename Variable1 to 'Menu1Hilite' or some other name that you'll remember. In the Action section of that variable-settings dialog, the Set Variable Value radio button should be selected- this is what you want. At the bottom of that dialog, change the Value to 1. We've now set up Variable1 (or Menu1Hilite) to get the value of 1 when it's moused over. Click OK.

4. The List of Variable Settings dialog should now have an entry, Assign 1 to Menu1Hilite (if you didn't change the variable's name, it'll be Assign 1 to Variable1 instead.) This is what you want- click Close.

5. Back in the Variable Settings dialog, repeat steps 2-4 to set up the Set Value when Rolled-off option; you want to assign Menu1Hilite (or Variable1) the value of zero when it's rolled off, to hide the menu item you'll be setting up shortly. When you've got the text object set up such that when it's moused over, the Menu1Hilite (or Variable1) variable gets assigned 1, and when it's moused off, that variable gets assigned zero, you can click OK as needed to close all the dialogs.

6. Now it's time to create your drop-down menu. Create a rectangle for the backdrop, and as many text items as you'll want to have in the menu. For each text item, choose Set Link and assign it a target, either a URL or another page in the SWF that you're building.

Arrange the text items on the rectangle, and group them all together using the Edit>Group Objects menu item (Edit>Grouping in MotionArtist 3.) Select the group, right-click on it and choose Properties. Name the group if you like, and click the Variable... button. Follow steps 2-5 above to have the menu also assign 1 to Menu1Hilite when moused over, and 0 when moused off- this keeps the menu from disappearing when we mouse off the text item and onto the menu itself.

When the Menu1Hilite variable assignments have been set up for the menu item, click the Show/Hide By Variable Value check-box, then click Settings....

7. In the Conditional Settings dialog that you'll get, choose Menu1Hilite (or Variable1) as the variable, and leave the rest at the default settings- thus when Menu1Hilite is equal to zero, the menu is hidden; when Menu1Hilite changes to 1, it appears. Click OK and dismiss the remaining dialogs.

8. Repeat this step for any other menus you wish to build- preview the page and check your work, to make sure the menu behaves as expected. The menu should pop up when you mouse over either the menu item in the menubar or the space that the pop-up menu itself will occupy- this is a consequence of the fairly simplistic way we're controlling the menu's behavior. More sophisticated control (using hidden or transparent graphic elements and/or additional variables) is possible but the logic can get a bit complex.

Submenus which pop out from the main menu can also be created, and hidden or revealed based on their own variables. That's beyond the scope of this tutorial; the process is the same but a bit of planning is highly recommended to ensure both that the page doesn't get cluttered and that the logic of the assorted variables causes the page elements to behave as expected.