![]()
![]()
The Flasher AppletDescription
The Flasher applet puts a text message in a box with a background color and font that you specify and animates it between two colors that you supply. You also supply a number of in-between colors you want to use and the speed that transitions take place. By varying the parameters, you can create a variety of effects. You may optionally supply a URL that the applet will tell the browser to load when clicked. Size: about 3,800 bytes
Examples
(for each example on the left, the HTML that generated it is on the right)
By only specifying only one step and making one of the colors the same as the background color, you get a blinking message. Note that moving the cursor over the flashing message shows a URL in your browser's status line. Clicking the flashing message will take you to that URL. Caution: blinking text is very annoying, use it with discretion.
<P ALIGN=center> <APPLET CODE="Flasher.class" CODEBASE="Java" WIDTH=100 HEIGHT=40 ALIGN=middle> <PARAM NAME=Text VALUE="Blinking!"> <PARAM NAME=TextFont VALUE=Times> <PARAM NAME=TextSize VALUE=24> <PARAM NAME=TextFace VALUE=0> <PARAM NAME=TextColor1 VALUE=255,255,255> <PARAM NAME=TextColor2 VALUE=255,0,0> <PARAM NAME=Steps VALUE=1> <PARAM NAME=Delay VALUE=100> <PARAM NAME=Background VALUE=255,255,255> <PARAM NAME=XPos VALUE=20> <PARAM NAME=YPos VALUE=32> <PARAM NAME=GoTo VALUE="http://www.anyURL.com"> Sorry, your browser does <B>not</B> support Java, so you can't see applet in action. </APPLET> </P>If you specify two different colors and a number of steps, the applet will morph between them, an effect that is a lot more pleasant than blinking text. Note that the size and style of text are different from the previous example.
<APPLET CODE="Flasher.class" CODEBASE="Java" WIDTH=100 HEIGHT=22 ALIGN=middle> <PARAM NAME=Text VALUE="Morphing!"> <PARAM NAME=TextFont VALUE="Times"> <PARAM NAME=TextSize VALUE=18> <PARAM NAME=TextFace VALUE=1> <PARAM NAME=TextColor1 VALUE=0,0,255> <PARAM NAME=TextColor2 VALUE=255,0,0> <PARAM NAME=Steps VALUE=6> <PARAM NAME=Delay VALUE=100> <PARAM NAME=Background VALUE=255,255,255> <PARAM NAME=XPos VALUE=5> <PARAM NAME=YPos VALUE=18> <PARAM NAME=GoTo VALUE="http://www.anyURL.com"> Sorry, your browser does <B>not</B> support Java, so you can't see applet in action. </APPLET>
If you specify a background color that doesn't match the one on your page, you set off the text in the applet even more. By making the Delay parameter large, you slow down the transitions between colors. Note that the usual alignment tags work with applets (this applet is inside of paragraph tags with align=right). Also, notice that the XPos and YPos paramters were used to put the text at the right spot within the applet's space.
<APPLET CODE="Flasher.class" CODEBASE="Java" WIDTH=100 HEIGHT=42 ALIGN=middle> <PARAM NAME=Text VALUE="Big!"> <PARAM NAME=TextFont VALUE="Helvetica"> <PARAM NAME=TextSize VALUE=36> <PARAM NAME=TextFace VALUE=0> <PARAM NAME=TextColor1 VALUE=0,0,255> <PARAM NAME=TextColor2 VALUE=0,255,0> <PARAM NAME=Steps VALUE=4> <PARAM NAME=Delay VALUE=1000> <PARAM NAME=Background VALUE=128,128,128> <PARAM NAME=XPos VALUE=20> <PARAM NAME=YPos VALUE=32> <PARAM NAME=GoTo VALUE="http://www.anyURL.com"> Sorry, your browser does <B>not</B> support Java, so you can't see applet in action. </APPLET>Parameters
The Flasher applet takes the following parameters:
Text The message to be displayed Required TextFont Name of the font for the message Optional TextSize Size (points) for message Optional TextFace 0-Plain, 1-Bold, 2-Italic Optional TextColor1 First R,G,B of message Optional TextColor2 Second R,G,B of message Optional Steps Number of steps between first and second color Optional Delay Milliseconds between changes Optional Background R,G,B of background Optional XPos X position of start of text Optional YPos Y position of start of text Optinoal 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