Vertical Tab Menu Overview
All the menu’s you see above are created from the same single preview file there is a parameter on the html where you can set the path to the xml file used. Within the xml file there are lots of different settings to change and play about with giving you the possibility of creating really unique and different menu’s from one file.
The menu can have as many items as you wish and can be incorporated into your own projects easily, even allowing individual colour styling for each item. You can change the font size, item spacing, item width, item height and item positioning, font colour, font positioning, background colour and alpha.
Adding a data_link attribute Type in your URL to the data link attribute not forgetting the http:// and then within the actionscript find the functions called “menu_press”. here i have commented out two functions which you can use.
//getURL(m.dataLink); to use the url function remove // at the start of the line and this will allow flash to call the dat_link attribute where the url is stored
//myEmptyMovieClip.loadMovie(m.dataLink); To load into a movie clip is a little more complicated you need to have a movieclip set up where you want to laod your file in weather it be a swf or an image. where i have myEmptyMovieClip this is where you put the name of your movie clip you are laoding into. html parameter settings
The xml file can be defined in a parameter in the code on the html page. if you look at the source of index.html you will see the different menus are all made form the same preview.swf but each calls a different xml file allowing each one to be styled different. The variable looks like this…
so.addVariable(“xml”,”xml/menu2.xml”);
the first part “xml’ is the variables name this does not change. the second is the path to the xml file the flash is to use “xml/menu2.xml”. In flash if this is left blank it will always look for the default xml file which is “xml/menu.xml”. Other benefits of having this feature is you can use the same menu on different levels of a site and still be able to link to the same xml file with out having to have copies in each folder.
Another parameter i have added is called itemOn this allows you to disable a menu item if you are already on the page it links to. for example if your already on the home page why do you need to link to it again it also highlights the page you are on so is informative to the user, letting them know they are on that page. So the varaibale is below.
so.addVariable(“itemOn”,”1”);
The variable is called “itemOn” and the item is defined by a number “1” now you might think this is the first item but flash starts to count from “0”. for instance the first menu item is home so if we wanted this to be highlighted and its click function disabled on a page we would put “0”. and so on down the list.
If you do not wish to have any menu item highlighted because it is going into anther flash file or for any other reason on some page just leave it blank and all items will be clickable and enabled.



13 Purchases
3 Comments