Folder Scroll

REGISTERED FILE IS MUCH SMALLER!
Evaluation Applet Size: 43K
Registered Applet Size: 9K

Here is how to set up the Folder Scroller applet in 3 easy steps.

1. Upload the file FolderScroll.class into the same directory as the web page that you are going to put the applet on. That is both the page and applet should be in the same place. You should also place the background image in this directory as well.

Advanced users can place the applet in a different directory using the CODEBASE attribute, but we won't get into that here.

2. Configure the parameters. This is the hardest part for most users, so read carefully.

First configure the applet tag to tell the browser which applet to load and how big to make it. The applet tag must include the following:
<APPLET CODE="FolderScroll.class" WIDTH=x HEIGHT=y>
Of course, substitute the width in pixels that you want the applet to be for x, and the height that you want for y. The width should be the same as the width of your background image.

Next, we need to create the actual parameters of the applet. Each parameter has a name and a value. The names are predetermined, the values are up to you. The tag appears as follows:
<PARAM NAME="Some Name" VALUE="Some Value">
Of course, that parameter will get you no where with this applet. Here is the list of parameters with the types of values that you should put in. You will notice that some of them have default values. Any parameter with a default value can be omitted if you are happy with the default value.

What we call the parameter (NAME) What we mean (VALUE)
BGCOLOR The background color of the applet, specified in hexadecimal just as when you create a web page. Example: Black=000000. Defaults to white.
SELCOLOR When an image is hyperlinked in this applet, and the mouse is placed over the image, a box will be drawn to indicate that there is a hyperlink. The parameter sets the color of that box, specified in hexadecimal just as when you create a web page. Defaults to no box drawn (transparent). Will be blue if you include the parameter and an invalid color code.
ANIMATION DELAY The delay in milliseconds between scrolling the images . Defaults to 10.
PAGE DELAY This is the delay in milliseconds, intended to be large (say 2000), that stops the scroller, every time a new page is shown. In this applet, a new page is shown every time the contents of the applet completely change.This delay is made every time the images have scrolled the height of the applet. Our example demonstrates these two delays. Defaults to 0 (no delay).
DELTA Y The number of pixels that each image moves in each animation in the vertical direction. A negative number will send the images up, a positive number sends them down. Defaults to 0, no vertical scrolling.
STOP ON MOUSE OVER This parameter instructs the applet to stop scrolling whenever the mouse is placed over the applet. Set the value to true if you want it to stop. Omit the parameter entirely if you do not, as the applet checks only for the parameters presence. Defaults to no stop on mouse over.
CAPTION FONT NAME The Font you want to use for the captions. The captions are the titles that will appear above the text. Choose from: Helvetica, Courier, TimesRoman, Symbol or Dialog. Defaults to Helvetica.
CAPTION FONT STYLE The style you want the caption font to appear as. Defaults to Plain. You can use Plain, Italic, Bold or BoldItalic.
CAPTION FONT SIZE The point size of the caption font to use. Defaults to 12.
CAPTION FGCOLOR The foreground, or regular color of the caption. The caption appears this color if it is not hyperlinked, or if it is hyperlinked, when the mouse is not over the corresponding image. Must be given in hexadecimal format, just as with HTML colors - e.g. black=000000. Defaults to black.
CAPTION SELCOLOR This is the color that a hyperlinked caption will turn when the mouse is placed over the image that contains the caption. Must be given in hexadecimal format, just as with HTML colors - e.g. black=000000. Defaults to the same color as the CAPTION FGCOLOR, that is, no change when the mouse is over hyperlinked text.
TEXT FONT NAME The Font you want to use for the text. Choose from: Helvetica, Courier, TimesRoman, Symbol or Dialog. Defaults to Helvetica.
TEXT FONT STYLE The style you want the text font to appear as. Defaults to Plain. You can use Plain, Italic, Bold or BoldItalic.
TEXT FONT SIZE The point size of the text font to use. Defaults to 12.
TEXT FGCOLOR The foreground, or regular color of the caption. The caption appears this color if it is not hyperlinked, or if it is hyperlinked, when the mouse is not over the corresponding image. Must be given in hexadecimal format, just as with HTML colors - e.g. black=000000. Defaults to black.
TEXT SELCOLOR This is the color that hyperlinked text will turn when the mouse is placed over the image that contains the text. Must be given in hexadecimal format, just as with HTML colors - e.g. black=000000. Defaults to the same color as the TEXT FGCOLOR, that is, no change when the mouse is over hyperlinked text.
INSET This is the number of the pixels from the left of the applet that you would like to be clear of text. You might consider this the margin. Defaults to 0.
TEXT STOP The number of pixels from the left of the applet where the last letter for the line should end. Thus, the applet will draw text from inset to text stop. Defaults to the width of the applet.
CAPTION STOP The number of pixels from the left of the applet where the last letter for the line of caption text should end. The applet will draw caption (title) text from inset to CAPTION STOP
BACKGROUND IMAGE This is the background image for the scroller. In our example, the BGIMAGE is the folder image. The background image is given as a URL relative to the page that the applet will appear on. If you have taken our advice and placed the images in the same directory as the applet and HTML file that the applet is going to appear in, you need only give the name of the image.
TARGET The window or frame that you want any hyperlink to be loaded into. Defaults to the same target or window as the page that the applet is on. In other words, if you don't know what the target is, don't worry, it will load where you expect it to.


Those are the basics. The most difficult part, and its not too difficult, is to set up the captions, text, and corresponding links. See the above example to examine the difference between CAPTIONS and TEXT.

First starting with the captions, it is important to recognize that the parameter name will be different for each caption. The first caption will be name "CAPTION 1" , the second will be named "CAPTION 2", the third, "CAPTION 3", and so on.

Since its been a long time since we showed you how the parameter should look, here is a refresher:
<PARAM NAME="CAPTION 1" VALUE="The first caption">
<PARAM NAME="CAPTION 2" VALUE="The second caption">

Note: The applet uses the number of captions that there are to determine how many corresponding TEXT elements there are. You cannot ommit this parameter and have the text still load. You could however, just set the VALUE=" ", if you do not want the caption.

The TEXT elements are made in the same way. The parameter with the name "TEXT 1" will appear underneath CAPTION 1. "TEXT 2" will be underneath CAPTION 2, and so on. The parameter will appear as follows:

<PARAM NAME="TEXT 1" VALUE="This is some text">

The link parameters are made in just the same way. LINK 1, LINK 2, LINK 3, and so on and correspond to the CAPTION/TEXT with the same number. LINK 1 is the link for both CAPTION 1 and TEXT 1. They are not divisible as far as the link is concerned. If you do not want to provide a link for a message, simply do not add the parameter. That is, if there is no link for either CAPTION 2 or TEXT 2, there should be no parameter named LINK 2.


Once you have created all of your parameters, just add a closing HTML tag, </APPLET> to tell the browser your done.

Here are the images we used:

 

Copyright 1999 Black Lab Design. All Rights Reserved. Javapplets.com is not affiliated with Sun Microsystems, Inc. Java and all Java-based trademarks are registered trademarks of Sun Microsystems, Inc. in the United States and in other countries. The www.sun.com Weblink Logo is a trademark or registered trademark of Sun Microsystems, Inc. in the U.S. and other countries. All applets are provided without any warranty, express or implied. Use of applets is limited to evaluation on pages not made available to more than 5 users. To derive full benefit from this website you must use a Java enabled browser such as Microsoft Internet Explorer 3.0+ or Netscape Navigator 2.0+. Please let us know if you run into any problems using this site or our applets. We want to know!