Cerebellum
To demonstrate how the menu works, the example below has no links - try clicking on "menus" !
I'm sure you've all seen the regular 1D site menus, but here's a new one that's 2D ! Only a 14 kB download for your visitors and would make a great index page ! Download it here !
How do I use Cerebellum ?
What are the parameters for Cerebellum ?
Name |
Value |
Example |
AppletHomePage |
http://go.to/javabase |
|
autoCollapse |
Include this tag for auto collapse (collapses old menus when new ones are opened) |
OK |
bgColor |
The page background colour |
FFFFFF |
background | An optional background image (jpeg or gif) | back.jpg |
textColor |
The normal text colour * |
880000 |
textFont |
Font to be used in format FONTNAME;STYLE;SIZE where style is r for regular, b for bold, i for italic and bi for bold italic. (eg. Times;b;12 is size 12 bold Times) * |
Times;r;12 |
optionColor |
Colour of bar and link behind menu text * |
FFEEAA |
showOptionEffect |
Effect when showing a new menu * |
shrink |
optionDraw | "fill", "edge" or "none". "fill" fills in the bar. "edge" highlights just the edge of the bar. "none" does not draw a bar. | fill |
mouseTextColor |
Colour of text on mouseOver * |
EEEEFF |
mouseTextFont |
Font to be used when the mouse is over the menu item. |
Times;bi;12 |
mouseOptionColor |
Colour of bar behind text on mouseOver * |
000088 |
mouseOverEffect |
Highlight bar effect on mouse over * |
left |
mouseDraw | "fill", "edge" or "none". "fill" fills in the bar when the mouse is moved over it. "edge" highlights just the edge of the bar. "none" leaves the bar alone. | fill |
delayTime | Time for each frame in milliseconds | 20 |
visibilityStep |
Speed at which menu appears (1-100) |
2 |
mouseOverStep |
Speed of mouseOver effects (1-100) |
4 |
showDelay |
How much the fade in is delayed for menus lower down the list |
10 |
padding |
How much bigger the bar behind the text is than the text |
10 |
spacing | How seperated the different menu options are | 100 |
lineThickness | The thickness of the lines between the menu options | 1 |
rounding |
How much to round highlight bar |
10 |
showDepth | Determines what depth of the menu is visible on startup. '0' means only the root options are visible. '1' means the first level is initially visible as well. | 1 |
drag | How long the menu takes to 'settle'. 1-10 | 5 |
menu |
See below for details |
|
key | Key supplied at registration |
* for these parameters, multiple values can be seperated by commas and the first value will apply the nodes of the tree at the top depth, the second to the 1st level submenus etc. See the example code.
What about the "menu" parameter ?
Like all javabase applets, the menu options are specified using the following formats:
{Name} |
For an unlinked option or tree node |
{Name,Link} |
For a link to be opened in the same frame |
{Name,Link,Frame} |
For a link to be opened in a different frame. Frame can also be "_new" for a new window, "_parent" for the frame's parent, "_top" for the top frame or "_self" for the applet's frame. |
So, for example, to make a link to altavista which opened in a frame called "main" the option would look like:
{Altavista,http://www.altavista.com/,main}
To use submenus, simply add a space to the beginning of the name of those options which you want to be indented as shown in the example code above. Multiple spaces can be used to make multiple levels of menu.
Using javascript
In order to use javascript as a link, you must add MAYSCRIPT to your applet tag, eg:
<applet code="Cerebellum.class" MAYSCRIPT>
You must then include your javascript as links, for example:
{Click me,javascript:alert('hello')}
How can I register?
Commercial sites are required to register. Other sites need not register, but their menus will show a link to Javabase.
Click here for registration details