Modern Java
http://www.modernminds.com
W ildAdBanner the Second Demo

WildAdBanner the Second presents two rotating banners that showcase the use of the WVPanelTimer module: one banner demonstrates how animation can be coordinated with scrolling text, while the second banner demonstrates two applications of simple animation.

A pplet Tag

The applet tag for the WildAdBanner the Second applet is shown below.

<APPLET CODEBASE="../../Java"
  WIDTH="170" HEIGHT="50"
  CODE="WildViewApplet.class">
<PARAM NAME="panelSet1"
  VALUE="DocExamples/WildAdBanner2/GraphicsAd.TXT">
<PARAM NAME="panelSet2"
  VALUE="DocExamples/WildAdBanner2/WebVisitsAd.TXT">
</APPLET>

Notice that two panels sets are used by WildAdBanner the Second: one panel set is used for each of the banners.

P anel Set Files

The panel set file that defines the "Fairy Suryana's Free Graphics" advertising banner is shown below.

<PANEL name=website module="WVPanelURL"
  x=0 y=0 w=170 h=50 target=Link
  url="http://www.dewa.com/3D/">

<PANEL name=TextVScroll module="WVPanelVScroll"
  x=7 y=2 w=100 h=46 clock=40
  justify=center fontSize=12 fontStyle=bold
  leading=-2 initWait=Eyeball>

<COLOR font=7D3B9D>
Psssst!<BR>Hey you!<P>
<TRIGGER panel=timer><WAIT>
No, get your eyeball over here!<P>
<TRIGGER panel=timer><WAIT timeout=1>
Now pay attention!<P>
Looking for some cool free graphics to spuce up your web site?<P>
Well look no more! Just CLICK to visit Fairy Suryana's...<P><BR><BR><BR>
<COLOR font=ff0000>FREE web graphics site!<P><P>
<TRIGGER panel=timer><WAIT timeout=4>
<SET panelSet="2">

<PANEL name=Eyeball module="WVPanelImage"
  x=115 y=0 w=50 h=50 loadTrigger=TextVScroll
  image="DocExamples/WildAdBanner2/Eyeball.GIF"
  displayX=50 displayY=0 displayW=50 displayH=50>

<PANEL name=timer module="WVPanelTimer">

<TRIGGER panel=Eyeball displayX=50 displayY=0 displayW=50 displayH=50>
<WAIT>
<TRIGGER panel=Eyeball displayX=0 displayY=0 displayW=50 displayH=50>
<WAIT timeout=3>
<TRIGGER panel=Eyeball displayX=50 displayY=0 displayW=50 displayH=50>
<WAIT timeout=3>
<TRIGGER panel=Eyeball displayX=100 displayY=0 displayW=50 displayH=50>
<WAIT timeout=3>
<TRIGGER panel=Eyeball displayX=0 displayY=0 displayW=50 displayH=50>
<WAIT timeout=3>
<TRIGGER panel=Eyeball displayX=100 displayY=0 displayW=50 displayH=50>
<TRIGGER panel=TextVScroll>
<WAIT>
<TRIGGER panel=Eyeball displayX=50 displayY=0 displayW=50 displayH=50>
<WAIT timeout=3>
<TRIGGER panel=Eyeball displayX=0 displayY=0 displayW=50 displayH=50>
<WAIT>

Remember that the timeOut value specified in a WVPanelTimer module's <WAIT> tag is in tenths of a second (i.e., 100 ms increments), and not whole seconds as it is for the <WAIT> tag in other modules.

Also, note that the <SET> tag uses a panel set number rather than a panel set file name. We could have specified

<SET panelSet="DocExamples/WildAdBanner2/WebVisitsAd.TXT">

instead of using

<SET panelSet="2">

but by using a number we can replace this advertising banner with another banner by just updating the HTML -- the GraphicsAd.TXT panel set file does not have to be changed.

The panel set file that defines the "HitList" advertising banner is shown below.

time=24

<PANEL name=MarketWave module="WVPanelURL"
  x=0 y=0 w=170 h=50 target=link
  url="http://www.marketwave.com/">

<PANEL name=HitList module="WVPanelImage"
  x=0 y=0 w=120 h=50
  image="DocExamples/WildAdBanner2/HitList.GIF"
  loadTrigger=HLTimer
  displayX=0 displayY=0 displayW=120 displayH=50>

<PANEL name=HLTimer module="WVPanelTimer"
  initWait=HitList>

<WAIT timeout=30>
<TRIGGER panel=HitList displayX=120 displayY=0 displayW=120 displayH=50>
<WAIT timeout=30>
<TRIGGER panel=HitList displayX=0 displayY=0 displayW=120 displayH=50>

<PANEL name=People module="WVPanelImage"
  x=120 y=0 w=50 h=50
  image="DocExamples/WildAdBanner2/WebVisitors.JPG"
  loadTrigger=PeopleTimer
  displayX=50 displayY=0 displayW=50 displayH=50>

<PANEL name=PeopleTimer module="WVPanelTimer"
  initWait=People>

<WAIT timeout=3>
<TRIGGER panel=People displayX=0 displayY=0 displayW=50 displayH=50>
<WAIT timeout=3>
<TRIGGER panel=People displayX=50 displayY=0 displayW=50 displayH=50>
<WAIT timeout=3>
<TRIGGER panel=People displayX=100 displayY=0 displayW=50 displayH=50>
<WAIT timeout=3>
<TRIGGER panel=People displayX=150 displayY=0 displayW=50 displayH=50>

The two timers used in this example (HLTimer and PeopleTimer) loop continuously until the panel set changes after 24 seconds (as indicated by the time=24 statement at the beginning of the panel set file).
I mage Files

The image files used by the WildAdBanner the Second applet are shown below.

Eyeball.GIF

HitList.GIF

WebVisitors.JPG
Copyright © 1997 by Modern Minds, Inc.