.
Parameters, Sample Code, and Use Notes
. |
| Please take the time to read through this section
thoroughly.
SHAMAN is a powerful presentation tool with a wide variety of control parameters and
options, and a good understanding of them is necessary to get the most out
of the applet. Expect to spend some time with the documentation!
For newcomers to more complex applets, don't let the apparently endless
list of parameters throw you. For the most part, they're just
repetitive, as you set parameters for each image and its corresponding
link, target, label, etc.
Parameters are divided into groups, below. The General Applet
Parameters are those that apply to the applet as a whole. Separate
sections cover Image, Label, and Link Parameters
Do not copy and
paste code from this page; though, of course, you may from the demo html code included with this kit.
|
<APPLET CODE="shaman.class" WIDTH=300 HEIGHT=300>
<PARAM NAME="Notice" value="Applet by www.BrainCode.com">
<PARAM NAME="KeyCode" value="Your_Key_Goes_Here">
<PARAM name="Speed" value="10">
<PARAM NAME="Sound" value="sound.au">
<PARAM NAME="BackgroundColor" value="0,255,0">
<PARAM NAME="BackgroundImage" value="bgstars.jpg">
<PARAM NAME="BackgroundMotion" value="4">
<PARAM NAME="BorderColor" value="55,255,115">
<PARAM NAME="BorderThickness" value="2">
<PARAM NAME="BorderStyle" value="1">
<PARAM NAME="ClearMode" value="1">
<PARAM name="Image0" value="giantpigs.jpg">
<PARAM name="Image1" value="bluehands.jpg">
<PARAM name="Image2" value="uglyfeet.jpg">
<PARAM name="Image3" value="rednoses.jpg">
<PARAM name="Image4" value="figwaffles.jpg">
<PARAM NAME="ImageXY0" value="155,35">
<PARAM NAME="ImageXY1" value="55,135">
<PARAM NAME="ImageXY2" value="5,35">
<PARAM NAME="ImageXY3" value="55,135">
<PARAM NAME="ImageXY4" value="55,5">
<PARAM name="Direction0" value="1">
<PARAM name="Direction1" value="3">
<PARAM name="Direction2" value="4">
<PARAM name="Direction3" value="7">
<PARAM name="Direction4" value="2">
<PARAM name="Pause0" value="1000">
<PARAM name="Pause1" value="2000">
<PARAM name="Pause2" value="3000">
<PARAM name="Pause3" value="1000">
<PARAM name="Pause4" value="5000">
<PARAM name="FontSize" value="14">
<PARAM name="FontName" value="Dialog">
<PARAM name="FontColor" value="255,0,0">
<PARAM name="FontStyle" value="0">
<PARAM name="LabelOnTop" value="1">
<PARAM name="LabelBoxColor" value="55,255,115">
<PARAM name="LabelBoxStyle" value="3">
<PARAM name="LabelBoxPadding" value="5">
<PARAM name="LabelBoxAutosize" value="1">
<PARAM name="LabelBoxWidth" value="268">
<PARAM name="LabelBoxJustify" value="1">
<PARAM name="LabelXY0" value="10,265">
<PARAM name="LabelXY1" value="10,265">
<PARAM name="LabelXY2" value="10,265">
<PARAM name="LabelXY3" value="10,265">
<PARAM name="LabelXY4" value="10,265">
<PARAM name="Label0" value="This is a round red thing">
<PARAM name="Label1" value="These are some planets">
<PARAM name="Label2" value="Jupiter in nifty pastels">
<PARAM name="Label3" value="This is a whole mess of planets">
<PARAM name="Label4" value="Must be some kind of green potato">
<PARAM name="StatusBarText0" value="This is Image 0">
<PARAM name="StatusBarText1" value="This is Image 1">
<PARAM name="StatusBarText2" value="This is Image 2">
<PARAM name="StatusBarText3" value="This is Image 3">
<PARAM name="StatusBarText4" value="This is Image 4">
<PARAM name="StatusBarTextLoading" value="Wait for next image...">
<PARAM NAME="ClickOverlap" value="50">
<PARAM name="Link0" value="http://0.com">
<PARAM name="Link1" value="http://1.com">
<PARAM name="Link2" value="http://2.com">
<PARAM name="Link3" value="http://3.com">
<PARAM name="Link4" value="http://4.com">
<PARAM name="Target0" value="_new">
<PARAM name="Target1" value="_top">
<PARAM name="Target2" value="_new">
<PARAM name="Target3" value="_top">
<PARAM name="Target4" value="_new">
</APPLET>
|
| ., |
.
General Applet Parameters & Settings
. |
| Setting the Applet Size |
| The dimensions of an applet on the screen are not set
with parameters, but with the width= and height= variables in the main
<applet> tag.
For example,. <APPLET CODE="shaman.class" WIDTH=300
HEIGHT=200> would cause the applet space to be 300 pixels
wide and 200 pixels high. |
| |
| Notice |
|
<param name="Notice" value="Applet by www.BrainCode.com">
The Notice parameter must be present, exactly, or the applet will
display an error message. A missing notice will not stop the applet
from functioning, however. |
| KeyCode |
|
<param name="KeyCode" value="FREE"> or <param name="KeyCode"
value="your_keycode_here"> If you have the FREE version... enter FREE in the
value. For example:
.....<param name="KeyCode" value="FREE">
If you have the PURCHASED version... enter your key in this value. For example:
.....<param name="KeyCode" value="AQ?/FFG1*PSU9">
For those with the purchased version, keys are automatically made for you dynamically off the BrainCode.com site.
You receive
clear, exact, explicit instructions on this at time of purchase, and each time that you make a key.
If you are unsure what the domain for the key is, use DOMAIN as the value in this parameter. For example:
.....<param name="KeyCode" value="DOMAIN">
and an information box in the applet will actually tell you the domain name needed
when getting a key for the applet.
A missing KeyCode parameter will not stop the applet;
though the notice plate will appear. An incorrect KeyCode parameter will open the information box,
indicating a key is needed for the domain where the applet resides.
|
| Speed |
|
<param name="Speed" value="10">
The Speed parameter sets the overall speed of applet performance.
Smaller numbers make the applet run faster, larger numbers make it run
slower. In general, a useful range may be anywhere from 1-30 or so
in this value; but experiment with it. Most uses require very low
values for this; often 1.
[Note: If you are using .gif images (especially transparent
.gif's, as in some of our demos) rather than the .jpg images that JAVA
applets so strongly prefer, you may need to set this value very low.
The .gif image format tends to drag down overall applet performance
considerably, and may cause some timing functions to be quite slow.]
|
| Sound |
|
<param name="Sound" value="soundfile.au"> The
Sound parameter sets the sound file to be used. The sound file will
normally be triggered when the mouse is clicked over an image.
If you do not require sound, leave this parameter out entirely.
[Note: An archive of pre-tested JAVA .au sound files is available at www.codebrain.com/archive.
Sound files for JAVA applets must be in a very specific format. For
more on this, see"Creating JAVA AU Sound Files" at http://www.codebrain.com/help.]
|
| . |
| BackgroundColor |
| <param name="BackgroundColor"
value="255,255,255">
This sets the background color of the applet in standard
rrr,ggg,bbb format.
Values are 0-255 for each of the three variables. Make sure you
include the commas.
If you're using a background image that fills the applet space, note
that the image will cover the applet background; so changing this
parameter would appear to have no effect.
[Do *not* use #FFFFFF format!] |
| . |
| BackgroundImage |
|
<param name="BackgroundImage" value="imagename.jpg>
BackgroundImage specifies the name of an image to be used in the
backgound of the applet. As a general rule, the image size will be the
same size as the applet width= and height=.
If you have the background image in motion (see BackgroundMotion,
below), it is possible to use images that are one-third the size of the
applet space in the direction of motion. It is especially important
to use .jpg format if you can if the background image is in motion.
If you do not wish to use a background image, simply leave this
parameter out entirely.
[Note: You can use either .gif's or .jpg's; but .jpg format is very
strongly preferred, as .gif's seriously drag down applet performance on
redraws. Use of .gif images may also result in irregular performance
of timing parameters.]
|
| . |
| BackgroundMotion |
| <param name="BackgroundMotion" value="4">
BackgroundMotion sets the direction of motion of
the BackgroundIimage (above).
0 = stopped (default)
1 = left to right
2 = right to left
3 = top to bottom
4 = bottom to top
[Note: You can use either .gif's or .jpg's; but .jpg format is very
strongly preferred, as .gif's seriously drag down applet performance on
redraws. Use of .gif images may also result in irregular performance
of timing parameters. This is especially true if you use transparent
.gifs in the ImageX images (below) -- and it may be necessary to set Speed
to 1 and all PauseX parameters to 1 for adequate performance if you
do! Note that using transparent .gif's in the ImageX images can be
effectively done, however, as in the accompanying demos; but that it does
take extra care.]
|
| . |
| BorderColor |
| <param name="BorderColor"
value="255,255,255">
BorderColor sets the color of the border (see BorderStyle and
BorderThickness, below) drawn around the edge of the applet space, in
standard rrr,ggg,bbb format.
Values are 0-255 for each of the three variables. Make sure you
include the commas.
[Do *not* use #FFFFFF format!] |
| . |
| BorderThickness |
| <param name="BorderThickness"
value="5">
BorderThickness sets the thickness, in pixels, of the border (see
BorderStyle, below) drawn around the edge of the applet space.
Usually more subtle borders are most attractive, in a range of 3-7; but
experiment with it.
If you do not want a border around the applet, set this value to 0. |
| . |
| BorderStyle |
| <param name="BorderStyle"
value="1">
BorderStyle sets the style of the border. The values are:
0 - flat (default)
1 - raised 3d effect
If you do not want a border around the applet, set BorderThickness
(above) to 0. |
| . |
.
Image & Image-Related Parameters
. |
| ClearMode |
|
<PARAM NAME="ClearMode" value="1">
ClearMode determines whether each image will be
removed from the applet space before presenting another, or whether the
prior image will remain visible while the next image is drawn. The
values are:
0 - leave the prior
image on the screen
1 - clear the current image before drawing the
next one |
| . |
| ImageX |
<PARAM name="Image0" value="giantpigs.jpg">
<PARAM name="Image1" value="bluehands.jpg">
<PARAM name="Image2" value="uglyfeet.jpg">
<PARAM name="Image3" value="rednoses.jpg">
The ImageX parameter sets the main (foreground)
images to be used by the applet.
The ImageX parameters *must* start with
Image0. There may be *no skips* in the numbering sequence!
Important Notes:
Either .gif or .jpg images may be used.
However, JAVA applets strongly prefer .jpg images. Note that if .gif
images are used (especially transparent .gif's, as in some of our demos),
they may slow applet performance significantly and cause PauseX timing to
stretch out considerably. If .gif's are used, you may need to set
the value of the Speed parameter (above) as low as 1, and the PauseX
parameters (below) may likewise need to be set at 1. |
| . |
| ImageXY |
<PARAM NAME="ImageXY0" value="155,35">
<PARAM NAME="ImageXY1" value="55,135">
<PARAM NAME="ImageXY2" value="5,35">
<PARAM NAME="ImageXY3" value="55,135">
The ImageXY parameter sets the final position of
each image, relative to the upper left corner of the image. The
first value is the x position (horizontal) and the second value is the y
position (vertical).
The numbering sequence corresponds to that used
for the images in the ImageX parameter (above).
If the image is moved onto the applet space with
one of the DirectionX parameters (below) greater than 0, then this is the
ending position -- where the image will stop once it slides onto the
applet space.
If DirectionX (below) is set to 0 (static), then,
of course, this is just the position of the upper left corner of the
image.
As an example,
<PARAM NAME="ImageXY1" value="55,135">
would cause Image1's final position to
be 55 pixels from the left edge of the applet space, and 135 pixels down
from the top edge of the applet space.
Be sure to use both values, and insert the comma. |
| . |
| DirectionX |
<PARAM name="Direction0" value="1">
<PARAM name="Direction1" value="3">
<PARAM name="Direction2" value="4">
<PARAM name="Direction3" value="7">
DirectionX controls the motion of the images in
the ImageX parameters (above) as they enter the applet space. The
numbering sequence corresponds to that of the images in the ImageX
parameters (above). The values are:
0 = static, no motion (default)
1 = left to right
2 = right to left
3 = top to bottom
4 = bottom to top
5 = top left to lower right
6 = bottom left to upper right
7 = top right to lower left
8 = bottom right to upper left
9 = random choice of the above
The image final position is set by the ImageXY parameters (above). |
| . |
| PauseX |
<PARAM name="Pause0" value="1000">
<PARAM name="Pause1" value="2000">
<PARAM name="Pause2" value="3000">
<PARAM name="Pause3" value="1000">
PauseX sets the amount of time an image will
pause in the applet space. The numbering sequence corresponds to
that of the images in the ImageX parameters (above).
The value is nominally in milliseconds (i.e.,
1000 is one second, 5000 is five seconds, etc.) As these values are
only approximate and are affected by the size and type of images used, you
will need to experiment with the values for best control of your
presentation.
As noted above, variously, if .gif images are
used, PauseX values may need to be set very low, and may no longer reflect
even an approximate relationship to millisecond values. |
| . |
.
Label & Status Bar Parameters
. |
| FontColor |
| <PARAM
name="FontColor" value="255,0,0">
FontColor sets the color of the text in the label. This is
in standard rrr,ggg,bbb format.
Values are 0-255 for each of the three variables. Make sure you
include the commas.
[Do *not* use #FFFFFF format!] |
| . |
| FontSize |
| <PARAM
name="FontSize" value="14">
FontSize sets the point size of the text in the labels.
Usually very small font sizes (less than 10) won't work well; and
larger sizes (over 20) may have a "dotty" appearance with some
fonts. The browsers interpret fonts slightly differently in some
cases, mostly with small differences in sizing, so check design in both
Netscape and Microsoft browsers for any necessary compromises. |
| . |
| FontStyle |
| <PARAM
name="FontStyle" value="1">
FontStyle sets the style of the font used in the labels. The
values are:
0 = plain (default)
1 = bold
2 = italic
3 = bold italic
[Do *not* use font style names! That will crash the
applet. Use the numerals as above.] |
| . |
| FontName |
| <PARAM
name="FontName" value="Dialog">
FontName sets the face of the font. The applet supports the
following font faces:
Dialog (default)
Courier
TimesRoman
|
| . |
| LabelOnTop |
| <PARAM
name="LabelOnTop" value="1">
LabelOnTop sets whether labels will always be in front of images, or if
the images can go over (hide) the labels. Setting the value to 0
allows images to be placed over labels -- useful for some effects. Setting this to 1 means the
label will always be "on top". |
| . |
| LabelBoxColor |
| <PARAM
name="LabelBoxColor" value="255,0,0">
LabelBoxColor sets the background, overall color of the label.
This is in standard rrr,ggg,bbb format. Values are 0-255 for each of the three variables.
Make sure you include the commas.
[Do *not* use #FFFFFF
format!] |
| . |
| LabelBoxStyle |
| <PARAM
name="LabelBoxStyle" value="3">
LabelBoxStyle sets the style of the label box. The default is no
box ( that is, 0, below) -- which will display just text, transparent over
background and images. The 3D filled rectangle is probably the most
attractive. These are the values:
0 = no label box (default) - just text shows
1 = clear rectangle - border rectangle around
text, but label background transparent
2 = filled rectangle - filled, flat rectangle
behind text
3 = filled 3d rectangle - filled, 3D border
rectangle behind text |
| . |
| LabelBoxPadding |
| <PARAM
name="LabelBoxPadding" value="5">
LabelBoxPadding sets the "padding" around the text in the
label box, with the value in pixels. If you set this to, say, 5 --
then a 5-pixel space is added to the left, right, top and bottom around
the text. Usually you want to set this to anything from 3 on up so
the labels won't have a crowded look. |
| . |
| LabelBoxAutosize |
| <PARAM
name="LabelBoxAutosize" value="0">
LabelBoxAutosize will automatically set the label size to fit neatly
around the text if set to 0 (the default). If you set the
LabelBoxAutosize parameter to 1, you can then use the LabelBoxWidth
parameter (below) to set all labels to a given size. |
| . |
| LabelBoxWidth |
| <PARAM
name="LabelBoxWidth" value="100">
LabelBoxWidth will *not* work unless you set LabelBoxAutosize (above)
to a value of 1. LabelBoxWidth will set the overall width of all
labels. The value is in pixels. |
| . |
| LabelBoxJustify |
| <PARAM
name="LabelBoxJustify" value="1">
LabelBoxJustify will left-, center-, or right-justify the text in the
label boxes. The values are:
0 = left (default)
1 = center
2 = right |
| . |
| LabelX |
<PARAM name="Label0" value="This is a round red thing">
<PARAM name="Label1" value="These are some planets">
<PARAM name="Label2" value="Jupiter in nifty pastels">
<PARAM name="Label3" value="This is a whole mess of planets">The
LabelX parameter sets the text for each label. The numbering sequence
corresponds to that of the images. Thus, Label0 sets the text for
the label that appears with Image0, Label1 sets the text for the label
that appears with Image1, and so on.
[Take care not to confuse the numeral '1'
with the letter 'l'.] |
| . |
| LabelXYx |
<PARAM name="LabelXY0"
value="10,26">
<PARAM name="LabelXY1" value="20,35">
<PARAM name="LabelXY2" value="30,44">
<PARAM name="LabelXY3" value="40,53">The
LabelXYx parameter sets the position in the applet space for each
label. The first variable is the x (across) position; the second
variable is the y (down) position. The variables set the position of
the upper left corner of the label; thus, <PARAM name="LabelXY2"
value="30,44"> would cause Label2's upper left
corner to be 30 pixels from the left edge of the applet space, and 44
pixels from the top edge of the applet space.
The numbering sequence corresponds to that of the images. Thus,
LabelXY0 sets the label position for the label that appears with Image0,
LabelXY1 sets the label position for the label that appears with Image1,
and so on.
[Take care not to confuse the numeral '1'
with the letter 'l'.
Be sure to use the commas.] |
| . |
| StatusBarTextX |
<PARAM name="StatusBarText0" value="This is Image 0">
<PARAM name="StatusBarText1" value="This is Image 1">
<PARAM name="StatusBarText2" value="This is Image 2">
<PARAM name="StatusBarText3" value="This is Image 3">
The StatusBarTextX parameter sets the text that will appear in the
browser status bar, relative to each ImageX.
The numbering sequence corresponds to that of the images. Thus,
StatusBarTextl0 sets the status bar text that appears with Image0,
StatusBarText1 sets the text for the status bar that appears with Image1,
and so on. |
| . |
| StatusBarTextLoading |
| <PARAM
name="StatusBarTextLoading" value="Wait for next
image...">
The StatusBarTextLoading parameter sets the text that will appear in
the browser status bar between image transitions. Frequently you
will wish to have this empty, so just use a space in the value, thus: value="
" |
| . |
.
Link Parameters
. |
| LinkX Parameter |
<param name="Link0" value="http://www.yoursite.com/somepage.html">
<param name="Link1" value="http://www.thatsite.com/anotherpage.html">
<param name="Link2" value="http://www.whatsite.com/thatpage.html">
<param name="Link3" value="http://www.somesite.com/thispage.html">
The LinkX parameter sets the link for each of the ImageX images
(above). The numbering sequence corresponds to that of the images.
Thus, Link0 sets the link for Image0, Link1 sets the link for Image1, and
so on.
The LinkX parameter uses absolute paths, only, in full, explicit http://
format.
|
| TargetX Parameter |
<param name="Target0" value="_new">
<param name="Target1" value="_top">
<param name="Target2" value="_blank">
<param name="Target3" value="_new">
The TargetX parameter sets the target for each of the ImageX images (above).
The numbering sequence corresponds to that of the images. Thus,
Target0 sets the target for Image0, Target1 sets the target for Image1,
and so on.
The Target parameter uses the same values as html for windows, for
example:
....._new - opens a new window *
....._blank - also a new window *
....._self - loads in the same frame
....._top - opens in the same window
The Target parameter can also set the target frame in a frameset. Use the name of the frame (exactly).
[NB: * Netscape and Microsoft browsers interpret
_blank and _new a little differently; try both.]
.
|
| ClickOverlap Parameter
|
|
<param name="ClickOverlap" value="50">
The ClickOverlap parameter stops reaction to
mouse clicks for a percentage of image travel when you have images in
motion; that is, with DirectionX (see above) parameters greater than 0.
If you set ClickOverlap to, say, 50 -- the mouse
would not react until the image is 60% through with its progress across
the applet space. This prevents unintentional clicking on the
'wrong' image in faster displays during image transitions. A good
value for this is usually 50.
[Be sure *not* to use a percent % sign with
this.]
..
|
|