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

WildAdBanner the Third shows off some of the capabilities of the WVPanelFx module by presenting two advertising banners the use several of the module's special transition effects.

The first banner displayed (Spirit Employment Agency) uses no graphic image file to create its animated display: everything that you see is created by WildView. The second banner (New World Employment Agency) uses a single graphic image file that contains a single image.

A pplet Tag

The applet tag for the WildAdBanner applet is shown below.

<APPLET CODEBASE="../../Java"
  WIDTH="300" HEIGHT="50"
  CODE="WildViewApplet.class">
<PARAM NAME="updateSound"
  VALUE="DocExamples/WildAdBanner3/Whoosh.au">
<PARAM NAME="panelSet1"
  VALUE="DocExamples/WildAdBanner3/SpiritAgency.TXT">
<PARAM NAME="panelSet2"
  VALUE="DocExamples/WildAdBanner3/NewWorld.TXT">
</APPLET>

Notes
  • Two panels sets are used by WildAdBanner the Third : one panel set is used for each of the banners.

  • There is a "updateSound" parameter specified. The "updateSound" parameter causes the specified sound to be played whenever WildView detects a panel set change. In this example, the sound will be played each time the ad rotates to draw attention to the new ad.
P anel Set Files

The panel set file that defines the Spirit Employment Agency advertising banner is shown below.

<PANEL name=text module="WVPanelText"
  hidden=true w=300 h=50
  background=000000
  fontStyle=bold justify=center align=middle>

<PANEL name=fx module="WVPanelFx"
  x=0 y=0 w=300 h=50
  clock=100 preRender=true frames=10
  notify=control sourcePanel=text
  sourceX=0 sourceY=0 sourceW=300 sourceH=50>

<PANEL name=control module="WVPanelTimer">
<TRIGGER panel=text text="Looking for Ghosts?"
  fontSize=24 fontColor=FF0000>
<TRIGGER panel=fx effect=evaporate>
<WAIT id=fx>
<WAIT timeout=10>
<TRIGGER panel=text text="Or Goblins?"
  fontSize=28 fontColor=FF00FF>
<TRIGGER panel=fx effect=evaporate>
<WAIT id=fx>
<WAIT timeout=10>
<TRIGGER panel=text text="Or Ghouls?"
  fontSize=32 fontColor=00ffff>
<TRIGGER panel=fx effect=evaporate>
<WAIT id=fx>
<WAIT timeout=10>
<TRIGGER panel=text text="Then you need
  the<BR>Spirit Employment Agency"
  fontSize=18 fontColor=ffff00>
<TRIGGER panel=fx effect=left+fade>
<WAIT id=fx>
<WAIT timeout=10>
<TRIGGER panel=text
  text="We handle the Dead for a Living"
  fontSize=18 fontColor=00ff00>
<TRIGGER panel=fx effect=right+fade>
<WAIT id=fx>
<WAIT timeout=10>
<SET panelSet=2 stop=true>

<PANEL name=weblink module="WVPanelURL"
  x=0 y=0 w=300 h=50
  url="../Examples/WildAdBanner3/SpiritAgency.html"
  target=WildAdBanner>

Notes
  • The WVPanelFx pre-renders the transition animation (preRender=true) in order to achieve a smoother animation.

  • After each trigger sent to the WVPanelFx panel (see the tags following the WVPanelTimer panel definition), there is a <WAIT> tag with an id=fx attribute. Since the WVPanelFx panel has specified a notify=control attribute, the <WAIT> tag is used to make certain that the transition animation has completed before the next transition animation is started.
The panel set file that defines the New World Employment Agency advertising banner is shown below.

<PANEL name=photo module="WVPanelImage"
  hidden=true w=300 h=50
  loadTrigger=control
  image="DocExamples/WildAdBanner3/NewWorld.JPG"
  displayX=0 displayY=0
  displayW=300 displayH=50>

<PANEL name=text module="WVPanelText"
  hidden=true w=300 h=50
  background=000000 fontStyle=bold
  justify=center align=middle>

<PANEL name=fx module="WVPanelFx"
  x=0 y=0 w=300 h=50
  clock=100 preRender=true
  frames=10 notify=control
  sourcePanel=text sourceX=0 sourceY=0
  sourceW=300 sourceH=50>

<PANEL name=control module="WVPanelTimer"
  initWait=photo>
<TRIGGER panel=text text="Is your destination unclear?"
  background=photo fontSize=18
  fontColor=ffff00>
<TRIGGER panel=fx effect=fade filter=blur>
<WAIT id=fx>
<TRIGGER panel=fx effect=fade filter=none>
<WAIT id=fx>
<WAIT timeout=20>
<TRIGGER panel=text
  text="Let us put you back on course."
  fontColor=ff0000>
<TRIGGER panel=fx effect=none>
<WAIT timeout=10>
<TRIGGER panel=photo displayY=10>
<TRIGGER panel=text background=photo>
<TRIGGER panel=fx>
<WAIT timeout=2>
<TRIGGER panel=photo displayY=20>
<TRIGGER panel=text background=photo>
<TRIGGER panel=fx>
<WAIT timeout=2>
<TRIGGER panel=photo displayY=30>
<TRIGGER panel=text background=photo>
<TRIGGER panel=fx>
<WAIT timeout=2>
<TRIGGER panel=photo displayY=40>
<TRIGGER panel=text background=photo>
<TRIGGER panel=fx>
<WAIT timeout=2>
<TRIGGER panel=photo displayY=50>
<TRIGGER panel=text background=photo>
<TRIGGER panel=fx>
<WAIT timeout=10>
<TRIGGER panel=photo displayY=0>
<TRIGGER panel=text background=photo
  text="New World Careers Corp."
  fontSize=22 fontColor=00ff00>
<TRIGGER panel=fx effect=zoom>
<WAIT id=fx>
<WAIT timeout=20>
<SET panelSet=1 stop=true>

<PANEL name=weblink module="WVPanelURL"
  x=0 y=0 w=300 h=50
  url="../Examples/WildAdBanner3/NewWorld.html"
  target=WildAdBanner>

Notes
  • The WVPanelTimer panel waits (initWait=photo) until the WVPanelImage panel has completely loaded the image file (loadTrigger=control) before it begins.

  • To achieve the effect where the earth is panned into view from the bottom to the top of the applet area, three tags are used. The first tag (<TRIGGER panel=photo displayY=xx>) moves the top edge of the NewWorld.JPG image area lower so that more of the portion of the image that contains the earth is displayed. The next tag (<TRIGGER panel=text background=photo>) causes the text ("Let us put you back on course") to be re-rendered, but with the text background updated with the new image in the photo panel (Set in the previous tag). Finally, the last tag (<TRIGGER panel=fx>) causes a "cut" transition from the current image to the new image (the last effect setting was "none"), thus giving the appearance that the earth is moving up and into view.
I mage File

The image file used by the New World Careers Corp. banner is shown below (the Spirit Agency banner does not use an image file).

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