|
|
Table of Contents |
The BannerPlayer applet is provided as a sample applet you can embed in your chat rooms to display banner advertisements. The Logo area to the left of the main VolanoChat window, and the Banner area at the top of each chat room window is an embedded Java applet. This provides for displaying local banner advertisements, or banner advertisements from remote ad servers such as LinkExchange, FlyCast or DoubleClick, to name a few. You can replace the bannerplayer applet with any Java applet of your choice, such as an audio or video applet. See Adding Other Applets (12.0)
An example instance of the BannerPlayer applet is shown below:
Applet 11.1: BannerPlayer applet.
This example displays three rotating banner images with a static navigation bar below 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="#000000">
<param name="foreground" value="#FFFFFF">
<param name="banner.width" value="468">
<param name="banner.height" value="60">
<param name="banner.cache" value="true">
<param name="banner.1" value="15 welcome.gif http://www.volano.com/">
<param name="banner.2" value="15 help.gif help.html">
<param name="banner.3" value="15 chatwithme.gif http://www.volano.com/">
<param name="bar.width" value="468">
<param name="bar.height" value="16">
<param name="bar.cache" value="true">
<param name="bar.ismap" value="true">
<param name="bar.image" value="0 bar.gif /cgi-bin/clickbar?">
</applet>
The banner images are linked to static Web pages with absolute and relative addresses, while the navigation bar is linked to a non-existent CGI script in order to demonstrate the use of image map coordinates.
When embedding the BannerPlayer in the chat rooms of your VolanoChat applet, simply place these applet parameter definitions within a Java properties file containing the same names and values. For example, the parameters shown above are defined as Java properties with:
background=#000000 foreground=#FFFFFF banner.width=468 banner.height=60 banner.cache=true banner.1=15 welcome.gif http://www.volano.com/ banner.2=15 help.gif help.html banner.3=15 chatwithme.gif http://www.volano.com/ bar.width=468 bar.height=16 bar.cache=true bar.ismap=true bar.image=0 bar.gif /cgi-bin/clickbar?
You then tell the VolanoChat applet where to find the properties for
its embedded applet with the banner.parameters property.
See the VolanoChat Properties page for more
information.
Sample BannerPlayer parameters defined as Java properties are found
in the
BannerPlayer.txt
file provided with VolanoChat. The complete list of all possible
BannerPlayer applet parameters is shown below.
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. The default is the background color of the window.
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. The default is the foreground color of the
window.
banner.width
banner.height
banner.cache
true if the banner images should be cached; otherwise
false. The default is false. A value of
false flushes all images previously displayed from the URL
before invoking the URL again for another image.
banner.ismap
true if the banner is an image map; otherwise
false. The default value is false.
banner.char
banner.n
n is a positive
integer that defines the sequence number of the banner image. The
numbers must be sequential and start with the number 1.
bar.width
bar.height
bar.cache
true if the bar image should be cached; otherwise
false. The default is false. A value of
false flushes all images previously displayed from the URL
before invoking the URL again for another image.
bar.ismap
true if the navigation bar is an image map; otherwise
false. The default value is false.
bar.char
bar.image
Image specification consists of three elements separated by spaces or tabs:
time src href
where:
time
src
href
null if the image has no link. A relative URL
is normally assumed to be relative to the applet code base. When the
BannerPlayer applet is embedded into the VolanoChat applet, a relative
URL is assumed to be relative to the location of the BannerPlayer's
properties file.
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 time value for the navigation bar is ignored.
Note that when either the parameter banner.ismap or
bar.ismap is set to true, its corresponding
links are converted into image maps with the correct coordinates of the
mouse cursor appended to the addresses. 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 |