Site hosted by Angelfire.com: Build your free website today!


MultiButton is a Java applet that allows you to create dynamic, interactive, multimedia style buttons inside any web browser that supports Java. The uses and effects you can create with MultiButton are endless. MultiButton is optimized to allow many buttons on a single page without increasing the download time.



Using MultiButton

To use the multibutton applet inside a web page, you need to copy the MultiButton class file into the directory that contains the HTML file.

You need to then add the applet tag inside the HTML file where you want the button to appear. The applet tag syntax is shown below.

Using the applet tag parameters you feed the applet the graphics, sound, options, and text it needs to perform its job.

You can look at the source of the mbdemo.html file included to get any hints that you need to get started.



The Applet Tag?

The applet tag is the HTML you need to add the GrowButton applet to your web page.
<applet code="MultiButton" width=84 height=24>
<param name=image1 value="buttons/red1.gif">
<param name=image2 value="buttons/red2.gif">
<param name=image3 value="buttons/red3.gif">
<PARAM NAME="link" VALUE="http://www.mbmdesigns.com/">
<PARAM NAME="soundup" VALUE="buttons/ding.au">
<PARAM NAME="sounddown" VALUE="buttons/ding.au">
<PARAM NAME="soundover" VALUE="buttons/ding.au">
<PARAM NAME="soundexit" VALUE="buttons/ding.au">
<PARAM NAME="buttontext" VALUE="Home Page">
<PARAM NAME="fontface" VALUE="buttons/ding.au">
<PARAM NAME="fontstyle" VALUE="0">
<PARAM NAME="fontsize" VALUE="12">
<PARAM NAME="upcolor" VALUE="FFFFFF">
<PARAM NAME="downcolor" VALUE="0000FF">
<PARAM NAME="overcolor" VALUE="FF0000">
<PARAM NAME="status" VALUE="MultiButton Demo">
<PARAM NAME="framelink" VALUE="_top">
You must have a Java-capable browser to see the demos.
</applet>

The code attribute is the name of class file you wish to load. The width and height are the dimensions of the java applet and both are required. There a few optional attributes that can go inside the initial applet area. You can use hspace and vspace to add a horizontal and vertical margin around the applet. You can also use an attribute called codebase that lets you put the class file in a certain directory. For instance:

<applet code="MultiButton" codebase="classes" width=84 height=24
hspace=10 vspace=10> <param name=image1 value="buttons/red1.gif"> <param name=image2 value="buttons/red2.gif"> <param name=image3 value="buttons/red3.gif"> <PARAM NAME="link" VALUE="http://www.mbmdesigns.com/"> <PARAM NAME="buttontext" VALUE="Home Page"> <PARAM NAME="fontface" VALUE="buttons/ding.au"> <PARAM NAME="fontstyle" VALUE="0"> <PARAM NAME="fontsize" VALUE="12"> <PARAM NAME="upcolor" VALUE="FFFFFF"> <PARAM NAME="downcolor" VALUE="0000FF"> <PARAM NAME="overcolor" VALUE="FF0000"> <PARAM NAME="status" VALUE="http://www.mbmdesigns.com/"> You must have a Java-capable browser to see the demos. </applet>

This applet would have a vertical and horizontal margin of 10 pixels. The class file is called MultiButton.class and is located in a folder called "classes".

The three image parameters tell MultiButton which images to use. The first image is displayed on startup, the second when the mouse is over the button, the third when the user clicks on the button. The above examples use button images called "red1.gif", "red2.gif", and "red3.gif" all in the directory called "buttons". The slashes are the UNIX style of folder breaks.

This link parameter is the URL of the page where MultiButton should go when it is clicked. The value needs to be a full URL, not a relative link.

The soundup, sounddown, soundover, and soundexit parameters take sound files in Sun uLaw au format and are played at the appropriate times.

The framelink parameter takes one of five values to link when using frames in HTML pages.

The value of the status parameter is displayed in the status bar of the browser the applet is being displayed in. If you are not going to use a custom message you should put in a status value that is equal to the link value so the button acts like other browser links.

The fontface parameter takes any valid font name. Be very careful in using the parameter! The font you choose needs to be installed on the user system to appear correctly. To make sure people see the button the way you intended use fonts that are common, such as TimesRoman, Courier, and Helvetica. If the applet cannot find the font it will substitute another one.

The fontsize parameter takes the point size of the font you are using. The fontstyle parameter takes a number to indicate the style you wish to be used.

The buttontext parameter takes the text that you wish to be displayed on the button's face. MultiButton takes this text and centers it on the applet using the size, style, and color you specified.

The upcolor parameter takes a hexidecimal color value in RRGGBB format (similar to the HTML body and font tag) that is used for the button's text in its normal position. The overcolor is used when the mouse is over the button and the downcolor is used when the user has clicked on the button. Do not put a "0x" or "#" before the RRGGBB value.

Any HTML that is between the last parameter tag and the close applet tag is displayed if the browser does not support Java. It is a good idea to tell the user that they need a Java-capable browser to view the applet. In many cases it is a good idea to display an image that is similar to your button so non-Java browsers act almost the same.



The Java Copy Protection System

All of mbm designs' applets have JCPS built-in to discourage the pirating of the code. When you order your applet we will send you an applet attached to an email message. That applet will be encoded with the IP address of your server that you provide.

The applet will only function properly on a machine with that IP address. This system prevents people from stealing the applet from your site and using it on there own.



Questions

If you have any questions or problems contact mbm designs at Info@mbmdesigns.com.

We offer full support for all of our applets and software.



For more information please contact Info@mbmdesigns.com.