Shokwave Software, Inc. -      Web Deco Kit

The MegaButton Applet

Description

The MegaButton applet does everything you would want a button to do in one small applet. It can be a regular, round-rectangle, text button or it can accept graphics and become a graphical button. It tracks the mouse and behaves like a regular native-OS button, but can also accept a graphic that highlights it when the mouse passes over (but you can omit this image if you don't need it). Pass it a URL as a destination and clicking the button takes the user to that URL. Tell it to use a new window, and it will open the URL you pass it in a new window, so the user can get back easily from the new destination. While it waits for the images to load, MegaButton acts like a regular text button, so it's ready to go to work for the user as soon as the applet loads. Size: about 4,800 bytes

Examples

(for each example on the left, the HTML that generated it is on the right)
Sorry, your browser does not support Java, so you can't see this applet in action.

This button uses three images for the Idle, Active (when the mouse is over it) and Pushed states. It has both a message for the status line of the browser and a URL GoTo.


<APPLET CODE="MegaButton.class" CODEBASE="Java" 
   WIDTH=60 HEIGHT=35 ALIGN=middle>
<PARAM NAME=ButtonName VALUE="Buy Now!">
<PARAM NAME=ButtonMessage VALUE="Click here to purchase">
<PARAM NAME=Background VALUE=255,255,255>
<PARAM NAME=GoTo VALUE="http://www.shokwave.com">
<PARAM NAME=IdleImageURL VALUE="b1idle.gif">
<PARAM NAME=ActiveImageURL VALUE="b1active.gif">
<PARAM NAME=PushedImageURL VALUE="b1pushed.gif">
Sorry, your browser does <B>not</B> support 
   Java, so you can't see this applet in action.
</APPLET>

Sorry, your browser does not support Java, so you can't see this applet in action.

This button is similar to the previous one, but it uses gifs with transparencies, making the button float over the background. Also, it doesn't specify an ActiveImageURL, so there is not active state for the button.


<APPLET CODE="MegaButton.class" CODEBASE="Java" 
     WIDTH=100 HEIGHT=40 ALIGN=middle>
<PARAM NAME=ButtonName VALUE="Button">
<PARAM NAME=ButtonMessage VALUE="Click here for FUN!">
<PARAM NAME=Background VALUE=255,255,255>
<PARAM NAME=GoTo VALUE="http://www.shokwave.com/buynow.html">
<PARAM NAME=IdleImageURL VALUE="b2idle.gif">
<PARAM NAME=PushedImageURL VALUE="b2pushed.gif">
Sorry, your browser does <B>not</B> support 
     Java, so you can't see this applet in action.
</APPLET>

Sorry, your browser does not support Java, so you can't see this applet in action.

You can also use MegaButton when without any graphcis at all.


<APPLET CODE="MegaButton.class" CODEBASE="Java" 
     WIDTH=70 HEIGHT=20 ALIGN=middle>
<PARAM NAME=ButtonName VALUE="List Dealers">
<PARAM NAME=ButtonMessage VALUE="Click here to list the 
     dealers near you">
<PARAM NAME=Background VALUE=255,255,255>
<PARAM NAME=GoTo VALUE="http://www.shokwave.com/showdeal.html">
Sorry, your browser does <B>not</B> support 
     Java, so you can't see this applet in action.
</APPLET>

Parameters

The Flasher applet takes the following parameters:

ButtonNameName inside buttonRequired
ButtonMessageMessage for status line when button is activeOptional
BackgroundR,G,B of backgroundOptional
IdleImageURLURL for image when button is idleOptional
ActiveImageURLURL for image when button is activeOptional
PushedImageURLURL for image when button is pushedOptional
GoToURL to Goto when applet is clickedOptional
Outside of PARM tagsHTML for those with non-Java browsersOptional



Web Deco Kit Page     Shokwave Home Page