internet.com logo The Java Boutique Java is a trademark of Sun Microsystems, Inc.
 ARTICLES
Tutorials
Reviews
Glossary
 APPLETS
by Category
by Date
by Name
Hall of Fame
Archive
Submit
Source Code
Servlets and JSP
 COMMUNITY
FAQ
Users Poll
Discussion Forum
Contact Us
 OTHER RESOURCES
Custom Applets
Java@Work
Java News
Jini Watch
Affiliate Programs

internet.com
IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

internet.commerce
Partner With Us
Compare Prices
Domain registration
Computer Deals
Dental Insurance
KVM over IP
Shop Online
KVM Switch over IP
Phone Cards
GPS Devices
Boat Donations
Best Price
Web Design
Televisions
Find Software

WebDeveloper Network
ExtremeFlash
FlashKit
FlashPlanet
Gif.com
JavaBoutique
JavaScript.com
JavaScriptSource
Jobs.Webdeveloper.com
JustSMIL
ScriptSearch
StreamingMediaWorld
VoiceXML Planet
WebDevelopersJournal The WDVL
WebDeveloper.com
WebReference.com
XML101

Web Developer
Opt-in Lists

CGI
HTML
Java
JavaScript
Web Design and Promotion
Web Site Development
E-mail Address:


Can you receive
HTML e-mail?

Yes   No

Zip Code:


TickerLine


3QuarksAppletsTickerLineParameter
The characteristics of the news ticker "TickerLine" can be configured over eleven parameters. Please consider that the symbol on the right beside the news ticker does not belong to the applet "TickerLine." With this symbol the audio output of the news ticker can be remote controlled via JavaScript.

Sound Button

  <applet code=TickerLine.class name=Ticker width=369 height=44>
    <param name=BackgroundColor value="#f5f5f3">
    <param name=BackgroundImage value="TickerBackground.gif">
    <param name=TickerFont      value="Andale.gif">
    <param name=TickerDelay     value="250,1000">
    <param name=TickerRect      value="13,15,341,18">
    <param name=TickerText      value="TickerLine, Version 1.0#random">
    <param name=TickerUrl       value="TickerText.txt">
    <param name=CharSound       value="Char.au">
    <param name=SpaceSound      value="Space.au">
    <param name=ReturnSound     value="Return.au">
    <param name=EnableSound     value="no">
  </applet>
ParameterBackgroundColor
  <param name=BackgroundColor value="#f5f5f3">
  <param name=BackgroundColor value="245,245,243">


With the parameter "BackgroundColor" you can configure the background color of the applet. The color is specified either by using a comma separated string with values for red, green and blue or alternatively using the hexadecimal HTML format "#rrggbb." When the applet is initially displayed, the background is filled as fast as possible with this color. Even if the applet uses a background image, a background color should be always specified. Otherwise the applet default background color (light-grey) appears first. In this example the background color of the HTML page is used.
ParameterBackgroundColor
  <param name=BackgroundImage value="TickerBackground.gif">

The optional background picture of the applet is set by the parameter "BackgroundImage." The value specifies the file name of the background picture. The supported image formats are GIF and JPG. If the applet is larger than the picture, then the applet is tiled using the picture. In such cases so-called seamless tiles should be used. If the applet is smaller, then the background picture is truncated on the right and bottom sides.
TickerBackground TickerBackground.gif
369 × 44 pixel
ParameterTickerFont
  <param name=TickerFont value="Andale.gif">

The image file with the bitmap font is set by the parameter "TickerFont." The picture in the GIF or JPG format contains the 96 printable fonts of the lower ASCII set, whereby the fonts are arranged in lines of 32 characters, each font having three lines. Based of the dimension of picture the applet calculates the font width and height. This parameter is mandatory; if it is missing or if the image file is not found, then only the applet background will be displayed.
Andale Andale.gif
image size: 352 × 54 pixel
font size: 11 × 18 pixel
On the page "Fonts" you find further bitmap fonts for the news ticker.
ParameterTickerDelay
  <param name=TickerDelay value="250,1000">

With the parameter "TickerDelay" you can set the waiting periods for a keystroke and a carriage return. The first value determines the waiting period according to each keystroke, the second value the waiting period before a carriage return or for a new line. Both numeric values indicates the delay time in units of thousandths of second.
ParameterTickerRect
  <param name=TickerRect value="13,15,341,18">

With the parameter "TickerRect" you can set the output area for the message text. The first two values determine the position relative to the upper left corner of the applet, the last two values determine the width and height of the output area. If this parameter is missing, then the entire applet will be uses as output area.

The applet automatically calculates the maximum number of representable characters in the output area using the font width and output width. From this value and the font height a rectangle is calculate, which is centered in the output area. The message text will be written into this rectangle.
ParameterTickerText
  <param name=TickerText value="TickerLine, Version 1.0#random">

With this parameter you can transfer a single-line message text to the applet. The text is written character for character into the output area and shifted horizontal to the left if necessary. If the line end is achieved, then the output area is cleared and the text is displayed again.

The applet "TickerLine" supports colored texts. The text color is specified by the hexadecimal HTML format "#rrggbb". In order to output for example the colored text "red, green, blue", you specify the parameter value "# ff0000red, #00ff00green, #0000ffblue" repectivly. The reserved keyword value "#random" lets you select a color for the text via a random number generator. In this example at the end of line a random color is selected, and applies then to the next output line. The character "#" is represented by the sequence "##".
ParameterTickerUrl
  <param name=TickerUrl value="TickerText.txt">

With the parameter "TickerUrl" a text file can be specified. In contrast to the parameter "TickerText" this file can contain several lines, which are then successively displayed. Please note that the parameter "TickerText" has priority. If you want to transfer the message text by a file, then you should not use the parameter "TickerText" at the same time. In this example the parameter is therefore disregarded.
ParameterCharSound
  <param name=CharSound value="Char.au">

With the parameter "CharSound" you can specify an audio file for the normal keystroke. This is played after the output of a character with the exception of the blank character. Please remember that the current Java versions support only the Sun AU format (8 bits, µlaw, 8000 Hz, one-channel).
Play Char.au
ParameterSpaceSound
  <param name=SpaceSound value="Space.au">

With the parameter "SpaceSound" you can specify an audio file for the blank keystroke. This is played after the output of a blank. Please remember that the current Java versions support only the Sun AU format (8 bits, µlaw, 8000 Hz, one-channel).
Play Space.au
ParameterReturnSound
  <param name=ReturnSound value="Return.au">

With the parameter "ReturnSound" you can finally specify an audio file for the carriage return. This is played before a carriage return or a new line. Please remember that the current Java versions support only the Sun AU format (8 bits, µlaw, 8000 Hz, one-channel).
Play Return.au
ParameterEnableSound
  <param name=EnableSound value="no">

With this parameter you can turn on or off the audio output. If the value is "no" as specified in the example, then the audio output is switched off. The value "yes" turns the audio output on. If this parameter is not specified or if an invalid value is specified, then the audio output is activated dependent on the operating system: For Microsoft Windows 95/98 the audio output is switched off, for all other operating systems the audio output is switched on. The basic adjustment made by the parameter can be modified over interface methods at run-time.

Consider please that repeated playing of audio clips under Microsoft Windows 95/98 can lead to a system crash. You can find further information to this error on the start page of the news ticker in the section "Problems."
January 9, 2000

Back to the TickerLine applet page


Applet Index
(sorted alphabetically)

A B C D E F G H I J K
L M N O P Q R S T U
V W X Y Z #s
The Java Source
(applets w/source code)

A B C D E F G H I J K
L M N O P Q R S T U
V W X Y Z

How to Add Java Applets to Your Site

New on the Java Boutique:

New Review:

Time Management Made Easy with the Quartz Enterprise Job Scheduler
Why not just use the Java timer API? This open source scheduling API boasts simplicity, ease-of-integration, a well-rounded feature set, and it's free!

New Applet:

Reverse Complement
Reverse Complement is a simple applet that converts DNA or RNA sequences into three useful formats.

Elsewhere on internet.com:

WebDeveloper Java
Lots of Java information on webdeveloper.com

WDVL Java
Thorough Java resource at the Web Developer's Virtual Library.

ScriptSearch Java
Hundreds of free Java code files to download.

jGuru: Your View of the Java Universe
Customizable portal with online training, FAQs, regular news updates, and tutorials.


Copyright 2002 INT Media Group, Incorporated. All Rights Reserved.
Legal Notices,  Licensing, Reprints, & Permissions,  Privacy Policy.
http://www.internet.com/