Modern Java
http://www.modernminds.com
W ildBackground Demo

The WildBackground example applet demonstrates text vertically scrolling over a background image.

A unique feature of this "scroller" is that the background image will change in synchronization with the text being displayed. In addition, the applet will pause the text when the mouse is moved into the text area, and clicking on the applet will link to a World Wide Web site.

A pplet Tag

The applet tag for the WildBackground applet is shown below.

Notice how the applet tag, which is placed in the HTML, requires very few parameters. The applet's panel set file controls almost every aspect of how the WildView display is defined.

<APPLET CODEBASE="../../Java"
  WIDTH="106" HEIGHT="132"
  CODE="WildViewApplet.class">
<PARAM NAME="panelSet1"
  VALUE="DocExamples/WildBackground/WildBackground.TXT">
<PARAM NAME="color" VALUE="000000">
</APPLET>
P anel Set File

The panel set file used by the WildBackground applet is shown below.

<!-- Vertical Scroller with Dynamic Background Image ->

<!-- The panel below (backgroundimage) is the source of the background image for the WVPanelVScroll panel (TextVScroll). ->

<PANEL name=backgroundimage module="WVPanelImage"
  hidden=true w=96 h=96
  loadTrigger=textvscroll
  image="DocExamples/WildBackground/WildBackground.JPG"
  displayX=0 displayY=0 displayW=96 displayH=96>

<PANEL name=TextVScroll module="WVPanelVScroll"
  x=5 y=5 w=96 h=96 clock=50
  justify=center fontSize=12 fontStyle=bold
  pause=enter leading=-3
  initWait=backgroundimage>

<TRIGGER panel=backgroundimage
  displayX=0 displayY=0 displayW=96 displayH=96>
<COLOR font=ffffff background=backgroundimage>

DTS Digital Surround<P>

DTS provides up to 6 discrete (separate) channels of high quality digital audio,

<TRIGGER panel=backgroundimage
  displayX=96 displayY=0 displayW=96 displayH=96>
<COLOR font=fadafe background=backgroundimage>

resulting in exceptional clarity throughout a "true" 360° soundfield.<P>

<TRIGGER panel=backgroundimage
  displayX=192 displayY=0 displayW=96 displayH=96>
<COLOR font=ffff00 background=backgroundimage>

DTS Digital Surround delivers up to 6-channels of transparent 20 bit audio at 44.1 kHz,

<TRIGGER panel=backgroundimage
  displayX=288 displayY=0 displayW=96 displayH=96>
<COLOR font=55ff22 background=backgroundimage>

resulting in a better than CD sound with high bit-rates and minimal digital compression.<P>

<TRIGGER panel=backgroundimage
  displayX=384 displayY=0 displayW=96 displayH=96>
<COLOR font=00ffff background=backgroundimage>

DTS represents the highest quality multi-channel audio possible within the compact disc, laserdisc and DVD audio standards.

<PANEL name=notice module="WVPanelText"
  x=5 y=104 w=96 h=26 background=000000
  fontSize=11 leading=-3 fontColor=00FF00
  justify=center blink=enter clock=200
  mouseX=0 mouseY=0 mouseW=106 mouseH=132>

Click to go to the DTS Web Site!

<PANEL name=weblink module="WVPanelURL"
  x=0 y=0 w=106 h=132
  url=http://www.dtstech.com target=DTS>

The "backgroundimage" panel defines the graphic file that will be used as the background for the scrolling text.

Note that the panel is positioned offscreen (the top-left coordinate is 500,500) because the image will only be "grabbed" by the scrolling text panel (i.e., it does not need to be displayed independently in the WildView display area).

When a panel is positioned offscreen, performance can be improved since the panel does not have to draw its contents in the WildView display.

Also notice that the "loadTrigger" attribute is used. The "loadTrigger" attribute tells the image panel to send a message to the "textvscroll" panel once the image has been completely loaded.

The trigger is used by the "textvscroll" panel to start the scrolling so that the text is not scrolled over a partial image.

The <TRIGGER> and <COLOR> tags are embedded in the scroll text in order to change the background image and the text color when specific points in the text are reached.

Notice that the mouse area for the "notice" panel (i.e., the static text panel that displays "Click to go to the DTS Web Site!") is defined to cover the entire applet area instead of just the panel's display area. This is done so that the text will blink whenever the mouse enters the applet instead of blinking only when the mouse enters the "notice" panel within the applet.
Copyright © 1997 by Modern Minds, Inc.