|
|
TutorialTo demonstrate these behaviors we're going to build a vertical flyout menu using the Open & Close Menu behaviors. The exercise should take about 5 - 10 minutes. If you haven't already done so download the behaviors. The Finished MenuHave a look at what we're going to build here. It's a simple horizontal menu with 4 buttons 2 of which reveal submenus onmouseover. To get started download the files and extract the contents to a folder in your FrontPage website. You'll find a blank page (index.html) with some CSS applied, 4 button images and a page background image. Open index.html and we're ready to start. Adding the Menu Buttons
Adding the Sub MenusWe'll add sub menus to each of the 2 menu buttons - each sub menu will be a layer.
Add The Closer LayerWe need to add 1 last layer to the page to close the sub menus.
Adding the BehaviorsTo make the menu work we need to add a behavior to each menu button. Click on out1.gif hit Format - Behaviors to open the behaviors window and choose Insert - Menu Tools - Close Menu and hit OK. FP will add the behavior as onclick we need to change this to onmouseover - in the behaviors window click onclick at the bottom of the list that appears choose events for a and then onmouseover. Click on out2.gif hit Format - Behaviors to open the behaviors window and choose Insert - Menu Tools - Open Menu choose layer2 in the list and hit OK. As we did above change the event to onmouseover. Click on out3.gif hit Format - Behaviors to open the behaviors window and choose Insert - Menu Tools - Open Menu and hit OK. As we did above change the event to onmouseover. Click on out4.gif hit Format - Behaviors to open the behaviors window and choose Insert - Menu Tools - Close Menu and hit OK. As we did above change the event to onmouseover. Finally we can add a behaviors to the closer layer - click on shim.gif inside the closer layer choose Format - Behaviors - Insert - Menu Tools - Close Menu and hit OK. As we did above change the event to onmouseover. Hiding the LayersAs a final step we need to make all the layers except layer1 invisible - choose Format - Layers and click to the left of layer2 and layer3 until you see a little closed eye - this will hide the layers. Your layers window should look like this.
FinishedThat's it - save the page and preview it in your browser. You may want to add FP swap image behaviors to the menu buttons as I did in the example. The technique is exactly the same for the other 2 example menus - just experiment to find an effect you like. ExamplesHere are examples of 3 different types of menu you can build. Vertical Flyout - The menu is arranged vertically along the
left of the page. The example
here also uses my CSS behavior. Horizontal Dropdown - This is probably the most common type of
menu. The buttons are arranged horizontally along the top of the page
the example also uses the stock FP swap image behavior to add JavaScript
image rollover effects. Horizontal Strip - This is an alternative horizontal menu, the
example also uses my CSS behavior to make an imageless menu |