Introducing... (May I have a drum roll please?) HeadLiner2 HeadLiner2 is, you guessed it, a text scroller --and more. You can scroll text in a variety of colors and sizes. You can change fonts on the fly. You can use Courier, TimesRoman, and Helvetica. You can have background images and scrolling images. HeadLiner2 offers the following applet parameters: FontName -- can be Courier, TimesRoman, or Helvetica. (The text you are reading is in Helvetica, 11 point size, plain.) FontSize -- can be just about anything between 1 and 127. FontStyle -- can be plain, bold, italic, or bolditalic VisibleLines -- tells the applet how many lines of text to display on the screen. Specify a low number and the applet will not use all the screen. Specify a high number and there will be a performance hit for printing text outside of the clipping region. (default is 15) FGColor -- specify the foreground (text) color using 6 hex digits with the first 2 digits being the red, the second 2 digits being the green and the final 2 digits being the blue components. Eg: "ff0000" = red BGColor -- specify the background color using the same format as the FGColor parameter. FileName -- specify the name of the file containing the text (default: "headlines.txt") ScrollDelay --specify the scrolling speed using 6 digits of base ten numbers representing the milliseconds between line scrolls. Eg: "010000" would be 10 seconds. Border --specify whether or not to show a border around the applet "1" = yes, "0" = no. Author --set this to "Mark Ganson" Origin --set this to "http://www.bigfoot.com/~java4free" Having the Author and Origin parameters set as indicated above will enable a new feature which allows you, the webmaster, to modify the URL the applet will link to when the surfer clicks the applet. Without these parameters, the applet will automatically link to my java4free website. Read on for more details on this. You can include inline formatting directly within your headlines.txt file. Use inline format tags to change the background color You use < like tags within your headlines.txt file. < specifies bold < undoes the bold. < specifies italic < undoes the italic These are indentical to the format of html tags and should be familiar to most people. Font changes are a little different from <: < specifies the Courier type face. < specifies the TimesRoman type face. < is what we are already using. < changes font sizes (NNN is between 1 and 127) < is the familiar hexadecimal way to change text color. < is the way to set the background color on the fly. You should limit background color changes to no more than one per each line of text. < tells HeadLiner2 to load an image (.gif or .jpg). < where N is a number between 0 and 9 tells HeadLiner2 which image (if more than 1) to display. You only need to load each image once. You can then display the same image as many times as you like. Example: suppose you have three (3) images you want to display: Image1.gif, Image2.gif, and Image3.jpg. You would use: < < < to load the images. To display them: < would display the first image (Image1.gif) < would display the second image (Image2.gif) < would display the third image (Image3.jpg) You may have up to 10 images per headlines.txt file. These images are numbered automatically by HeadLiner2 in the order they appear in the headlines.txt file. Numbering begins at 0 and ends at 9. You can also specify a stationary background image with < This will cause the image file named "someimage.gif" to be used as a background image. It will be placed with its upper left corner in the upper left corner of the applet. The text will appear to scroll right over it. < can be used to set the background image to one of your preloaded images. A great idea might be to put an animated image that only fits maybe 1/5 of the applet's width and all of its height as the background image. Then add leading spaces to your text in your headlines.txt file. < will turn the background image off. Previously, if you clicked on the applet, you were redirected to my java4free website. Now you, the webmaster, can modify this property to link to whatever URL you choose, your own site or, perhaps, an advertiser. To enable this new feature, you must add the following applet parameters to your html code: < < Then, in your headlines.txt file, add the 2 newly supported inline tags: < and < For example, to redirect your visitors to a great site devoted to handicapping NFL football games, you could add the following lines to your .txt file: < < Whatever URL follows < < The new link and status tags remain in place until overwritten with new tag definitions. As you saw (or heard) in the beginning of this demo, you can play audio files as I did with the drum roll effect. You use the < inline tag to play a .au 8,000 hz 16 bit mono gLaw audio file. Use < to repeatedly play the same file over and over again. Use < to stop the file from playing. Use < to reinitialize the sound playing mechanism to play the same file or another file later on in your headlines.txt file. For example, to play the drum roll sound, I used <. To be able to play the same sound again later in the file, I used < somewhere further down in the text of the file. (If you use < too early in the headlines.txt file following the < tag, the applet will play the same file over and over again as long as the line containing the < tag is being displayed on the screen.) Example: << << << << You could use this feature to play multiple files concurrently, which might be a pretty neat effect. On the other hand, this might not be what you want to do... You can always stop the sound with <. Summary So, what you have is a very powerful tool for selling. You could have an image file, similar to the standard banner ads, with a twist: scrolling text promoting the virtues of whatever it is you are trying to sell. Add a few well-placed attention-grabbing sound bytes and you have a compelling multimedia presentation tool. I would recommend using an advertiser's smaller banners as a background image to be displayed on the left side of the applet. Use leading spaces in your text file so the scrolling text appears just to the right of the banner image. Set the < and < values appropriately. Use a small sound file related to the banner, example: a cha-ching cash register sound if you are promoting something that will make the surfer some $green$