![]()
![]()
The MegaButton AppletDescription
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)
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>
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>
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:
ButtonName Name inside button Required ButtonMessage Message for status line when button is active Optional Background R,G,B of background Optional IdleImageURL URL for image when button is idle Optional ActiveImageURL URL for image when button is active Optional PushedImageURL URL for image when button is pushed Optional GoTo URL to Goto when applet is clicked Optional Outside of PARM tags HTML for those with non-Java browsers Optional
Web Deco Kit Page Shokwave Home Page