|
|
Table of Contents |
The BannerPlayer applet is provided as a sample applet you can embed in your chat rooms to display banner advertisements. A sample BannerPlayer applet is shown below:
Applet 10.1: BannerPlayer applet.
This sample displays three rotating banner images with a static navigation bar from LinkExchange underneath the banner area. The banner images are displayed in the standard full banner image size of 468 by 60 pixels recommended by the Internet Advertising Bureau. The HTML tags used to create the BannerPlayer applet instance shown above are:
<applet codebase="vcclient" code="COM.volano.BannerPlayer.class"
width="468" height="76">
<param name="background" value="#FFFFFF">
<param name="foreground" value="#000000">
<param name="banner.width" value="468">
<param name="banner.height" value="60">
<param name="banner.1" value="10 help.gif vcclient/help.html">
<param name="banner.2" value="10 welcome.gif http://www.volano.com/">
<param name="banner.3" value="10 chatwithme.gif http://www.volano.com/">
<param name="bar.width" value="468">
<param name="bar.height" value="16">
<param name="bar.image"
value="0 ../showbar.gif http://banner.linkexchange.com/1/X540954/clickbar?x,y">
</applet>
When embedding the BannerPlayer in the chat rooms of your VolanoChat applet, simply place these applet parameter definitions with a Java properties file containing the same names and values. For example, the parameters shown above are defined as Java properties with:
width=468 height=76 background=#FFFFFF foreground=#000000 banner.width=468 banner.height=60 banner.1=10 help.gif vcclient/help.html banner.2=10 welcome.gif http://www.volano.com/ banner.3=10 chatwithme.gif http://www.volano.com/ bar.width=468 bar.height=16 bar.image=0 ../showbar.gif http://banner.linkexchange.com/1/X540954/clickbar?x,y
Sample BannerPlayer parameters defined as Java properties are found
in the
BannerPlayer.txt
file provided with VolanoChat. The BannerPlayer applet parameters are:
width
height
background
#RRGGBB, where RR is the red hexadecimal
value, GG is the green hexadecimal value, and
BB is the blue hexadecimal value. The background is visible
when displaying transparent images or when the images are smaller than
the applet size.
foreground
#RRGGBB, where RR is the red hexadecimal
value, GG is the green hexadecimal value, and
BB is the blue hexadecimal value. The foreground color is
the color of the text used to display error message when the applet is
unable to load an image.
banner.width
banner.height
banner.n
n is the sequence
number of the banner image. The numbers must be sequential and start
with the number 1. The value of this parameter consists of three fields,
separated by spaces or tabs:
bar.width
bar.height
bar.image
Relative URLs in the image source or link fields are assumed to be relative to the applet codebase. Images can be animated GIF files, standard GIF files, or JPEG files. Specify a time of zero to display an image indefinitely. For example, you could specify the last image in a series to be displayed indefinitely in order to prevent the sequence from being repeated. The navigation bar can be displayed indefinitely by specifying a time of zero.
Note that when the image links have the suffix "x,y",
the link is converted into an image map with the correct coordinates of
the mouse cursor appended to the URL. You'll see this in action if you
look at the link in your browser status area while you move your mouse
cursor over the navigation bar in the BannerPlayer applet shown above.
|
|
Check HTML | Table of Contents |