SlideViewer Script Format Description
This page describes the script file format for the SlideViewer
applet, followed by a short example. Due to the variety of options
available in the scripts, there is a quick reference section for the
command format, followed by a section that describes the commands in
full detail. The first section below describes some the general
script file format.
SlideViewer Script General Format Notes
The following list contains general information about the script
file format.
- Spacing is irrelevant (lack of spacing is not, so
there still has to be at least one space between parameters
of a command). Hence, the start of the line needn't be at
the first column, and multiple spaces anywhere is insignificant.
- Lines with '!' as the first non-blank character are considered
comments and ignored.
- Blank lines are ignored.
- Each line must contain only 1 command.
- Parameters given to functions are handled simply as
<parameter name>=<value>. If the command does not
use the parameter, it is simply ignored.
SlideViewer Script Quick Command Format Reference
The following script format description is in semi-EBNF format.
Special Non-Transition Commands
- pic key=<keyname of pic> ( url=<picurl> | rgb=<color> | url=<picurl> rgb=<color> )
[ page=<pageurl> [ target=<frame name> ] ]
- Declares an image so that it is available to transitions
- do
- Begins a do-repeat loop section
- repeat times=<int>
- Ends a do-repeat loop, repeating the section times times
- SKIP
- Begins a skip section in which all commands are ignored
- ENDSKIP
- Ends a skip section
Transition Commands
- appear <pic>
- explode <pic> <delay> <speed>
- fadeIn <pic> <delay> <speed>
- fadeOut <delay> <speed>
- implode <pic> <delay> <speed>
- pixelin <pic> <delay> <pixelSize>
- rollIn <pic> <delay> <speed> <anydirection>
- rollOut <pic> <delay> <speed> <anydirection>
- rotate <pic> <delay> <speed> <linedirection> <strip>
- slide <pic> <delay> <speed> <direction>
- slideOver <pic> <delay> <speed> (<direction> | <fromdirection>)
- stripsOver <pic> <delay> <speed> <direction> <strip> step=<posint> type=(0 | 1)
- stripsSlide <pic> <delay> <speed> <direction> <strip> step=<posint> type=(0 | 1)
- wavyMorph <pic> <delay> <speed> <linedirection> <strip> amplitude=<int> replace=<posint>
- wipe <pic> <delay> <speed> <pivot> <strip> clockwise=(1 | -1)
Delay Commands
- decayDelay <non-negint> <delay> <speed> size=<posint> gravity=<int>
- delay <non-negint>
- wavyDelay <non-negint> <delay> <linedirection> <strip> theta=<posint> amplitude=<int>
All parameters for transitions are optional except for the
<pic> parameter. For delays, all parameters are optional,
with the <non-negint> delay time defaulting to 1 second.
Here are descriptions of the non-terminals used in the above
definitions:
*****************************************************************
<pic> ::= pic=<keyname of pic>
<direction> ::= dir=(Left | Right | Up | Down)
<anydirection> ::= <direction> | dir=(LeftRight | UpDown)
<linedirection> ::= dir=(horiz | horizontal | vert | vertical)
<fromdirection> ::= dir=(TopLeft | TopRight | BotLeft | BottomLeft |
BotRight | BottomRight)
<pivot> ::= pivot=(TopLeft | Top | TopRight | Left | Center | Right |
BotLeft | BottomLeft | Bottom | BotRight | BottomRight)
<delay> ::= delay=<non-negint>
<pixelSize> ::= pixelSize=<posint>
<jumpSize> ::= jumpSize=<posint>
<speed> ::= speed=<posint>
<strip> ::= strip=<posint>
<int> ::= ..., -2, -1, 0, 1, 2, ...
<non-negint> ::= 0, 1, 2, ...
<posint> ::= 1, 2, 3, ...
<color> ::= <0..255>,<0..255>,<0..255>
*****************************************************************
SlideViewer Script Complete Command Format Description
Description of Special Non-Transition Commands
- pic -- Declares an image so that it is available to transitions.
If the image is not of the maximum width and height of all
the images, it will be centered in the applet space with
the extra area being padded with the rgb color,
which defaults to 0,0,0 (black).
- Declares an image so that it is available to transitions
Parameters:
- key -- the name associated with the transition. This is
the name that will be used in the pic=
parameter of transition commands.
(Required)
- url -- specifies the URL address of the image
- rgb -- specifies the color to use as padding space around
the image (if any) or as the entire image if no
image file (url) is specified or found
- Note:Either url or rgb must be specified. Both
may be specified. If only rgb is specified, the
entire image will be the solid rgb color.
- page -- specifies the URL of the page to bring up when the
user clicks on the image (the URL will be displayed
in the message bar of the browser when the URL is
available for clicking).
- target -- specifies the name of the frame to put the page
in if the user clicks on the image. The default is
"_self", which brings the page up in the frame that
the applet is in. Quotes (") may be used to contain
the target name if desired, but are not required
(unless there are spaces in the target name).
- do -- Begins a do-repeat loop section
Parameters: None
- repeat -- Ends a do-repeat loop, specifying the number of times
to repeat
Parameters:
- times -- the number of times to repeat the section.
Therefore, times=2 causes the section to
be executed 3 times, since it is run once
and repeated twice.
(Required)
- SKIP -- Begins a skip section in which all commands are ignored
Parameters: None
- ENDSKIP -- Ends a skip section
Parameters: None
Description of Transition Commands
- Appear -- Instantly show the image on top of the other.
Parameters:
- pic -- Specifies the name of the picture to show.
Must be the same as a key from the key=
parameter of a pic command.
(Required)
- Explode -- Expand out an image over the old image from the center
outward in all directions.
Parameters:
- pic -- Specifies the name of the picture to show.
Must be the same as a key from the key=
parameter of a pic command.
(Required)
- delay -- the delay time between transition steps
(Default 100)
- speed -- the percentage to move outward over the image in each
step, where the image begins at 0% and is completely
on at 100%.
(Default 3)
- FadeIn -- Fade in the new image from a black image. If the current
image is not a plain black image, the image will flash to
black for the fade in. NOTE: Fades tend to be extremely
slow, so you will probably want a higher speed than default
(to 10 or higher), or to avoid the fades.
Parameters:
- pic -- Specifies the name of the picture to show.
Must be the same as a key from the key=
parameter of a pic command.
(Required)
- delay -- the delay time between transition steps
(Default 50)
- speed -- the percentage to add to the fade in value in
each step. The image starts black at 0% brightness
and ends at a normal 100% brightness.
(Default 4)
- FadeOut -- Fade the current image out to black.
NOTE: Fades tend to be extremely slow, so you will
probably want a higher speed than default (to 10 or
higher), or to avoid the fades.
Parameters:
- delay -- the delay time between transition steps
(Default 50)
- speed -- the percentage to subtract from the fade out value in
each step. The image starts at a normal 100%
brightness and ends at 0% brightness (black).
(Default 4)
- Implode -- Expand in an image over the old image from the outside
inward to the center from all directions
Parameters:
- pic -- Specifies the name of the picture to show.
Must be the same as a key from the key=
parameter of a pic command.
(Required)
- delay -- the delay time between transition steps
(Default 100)
- speed -- the percentage to move inward over the image in each
step, where the image begins at 0% and is completely
on at 100%.
(Default 3)
- PixelIn -- Change random pixels of the current image into pixels of
the new image until all pixels have been changed.
Parameters:
- pic -- Specifies the name of the picture to show.
Must be the same as a key from the key=
parameter of a pic command.
(Required)
- delay -- the delay time between transition steps
(Default 100)
- pixelSize -- the size (courseness) of the pixels, so larger
numbers represent larger blocks to be replaced
in the pixelIn process.
(Default 4)
- RollIn -- "Roll" in the image as if it is a rolled up rug that is being
unrolled onto the image in the direction specified.
Parameters:
- pic -- Specifies the name of the picture to show.
Must be the same as a key from the key=
parameter of a pic command.
(Required)
- dir -- supports these directions:
- Right -- Roll the image in to the right
- Left -- Roll the image in to the left
- Up -- Roll the image in upward
- Down -- Roll the image in downward
- UpDown -- Roll the image in from the top and bottom to the
center
- LeftRight -- Roll the image in from the left and right to
the center
(Default Left)
- delay -- the delay time between transition steps
(Default 50)
- speed -- the number of pixel columns/rows to cover in each step
(Default 4)
- RollOut -- "Roll" up the current image in the direction specified,
"leaving" the new image visable beneath it.
Parameters:
- pic -- Specifies the name of the picture to show.
Must be the same as a key from the key=
parameter of a pic command.
(Required)
- dir -- supports these directions:
- Right -- Roll out the old image to the right
- Left -- Roll out the old image to the left
- Up -- Roll out the old image upward
- Down -- Roll out the old image downward
- Note:These four are identical to RollIn's in
the same direction.
- UpDown -- Roll out the image to the top and bottom from
the center
- LeftRight -- Roll out the image to the left and right from
the center
(Default Left)
- delay -- the delay time between transition steps
(Default 50)
- speed -- the number of pixel columns/rows to cover in each step
(Default 4)
- Rotate -- Rotate on the new image, as if the current image is on
one side of a board with the new image on the other and
the board is rotated so you can see the other side.
Parameters:
- pic -- Specifies the name of the picture to show.
Must be the same as a key from the key=
parameter of a pic command.
(Required)
- dir -- supports these directions:
- Horizontal -- rotate the board horizontally about the
vertical axis
- Vertical -- rotate the board vertically about the
horizontal axis
(Default Horizontal)
- delay -- the delay time between transition steps
(Default 50)
- strip -- the width of the strips to use
(Default 2)
- speed -- the number of degrees to add to the rotation angle
for the board in each step
(Default 4)
- Slide -- Slides the new image on in the direction specified,
sliding the old image off in the process.
Parameters:
- pic -- Specifies the name of the picture to show.
Must be the same as a key from the key=
parameter of a pic command.
(Required)
- dir -- supports these directions:
- Right -- Slide the image on to the right from the left
- Left -- Slide the image on to the left from the right
- Up -- Slide the image up from the bottom
- Down -- Slide the image down from the top
(Default Left)
- delay -- the delay time between transition steps
(Default 50)
- speed -- the number of pixels to slide the image in each step
(Default 4)
- SlideOver -- Slides the new image on in the direction specified,
sliding over the stationary old image.
Parameters:
- pic -- Specifies the name of the picture to show.
Must be the same as a key from the key=
parameter of a pic command.
(Required)
- dir -- supports these directions:
- Right -- Slide the image on to the right from the left
- Left -- Slide the image on to the left from the right
- Up -- Slide the image up from the bottom
- Down -- Slide the image down from the top
- TopLeft -- Slide the image in from the top left corner
- TopRight -- Slide the image in from the top right corner
- BottomLeft -- Slide the image in from the bottom left corner
- BottomRight -- Slide the image in from the bottom right corner
(Default Left)
- delay -- the delay time between transition steps
(Default 50)
- speed -- For Right, Left, Up, and Down, speed is the number of
pixels to slide the image in each step. For TopLeft,
TopRight, BottomLeft, and BottomRight, speed is the
percentage to move onto the image in each step, where
the image begins at 0% and is completely on at 100%.
(Default 4)
- StripsOver -- Slides in strips of the new image over the old one.
Parameters:
- pic -- Specifies the name of the picture to show.
Must be the same as a key from the key=
parameter of a pic command.
(Required)
- dir -- supports these directions:
- Right -- Slides the strips in to the right
- Left -- Slides the strips in to the left
- Up -- Slides the strips in upward
- Down -- Slides the strips in downward
(Default Left)
- delay -- the delay time between transition steps
(Default 100)
- speed -- the number of pixels inward to slide in each step
(Default 10)
- strip -- the width of the strips to use
(Default 3)
- step -- distance between the start of each strip
(Default 6)
- type -- 0 = left/top slides in first, 1 = right/bottom is first
(Default 0)
- StripsSlide -- Slide in strips of the new image, sliding off strips of
the old image in the process.
Parameters:
- pic -- Specifies the name of the picture to show.
Must be the same as a key from the key=
parameter of a pic command.
(Required)
- dir -- supports these directions:
- Right -- Slide the strips in to the right
- Left -- Slides the strips in to the left
- Up -- Slides the strips in upward
- Down -- Slides the strips in downward
(Default Left)
- delay -- the delay time between transition steps
(Default 100)
- speed -- the number of pixels inward to slide in each step
(Default 10)
- strip -- the width of the strips to use
(Default 3)
- step -- distance between the start of each strip
(Default 6)
- type -- 0 = left/top slides in first, 1 = right/bottom is first
(Default 0)
- WavyMorph -- Cause the current image to become unrecognizably wavy,
then replace strips of the wavy image with strips of the
new image until all are replaced, and "unwave" it to
normal.
Parameters:
- pic -- Specifies the name of the picture to show.
Must be the same as a key from the key=
parameter of a pic command.
(Required)
- dir -- supports these directions:
- Horizontal -- the strips of the image are horizontal
and slide left and right
- Vertical -- the strips of the image are vertical
and slide up and down
(Default Horizontal)
- delay -- the delay time between transition steps
(Default 50)
- speed -- specifies 100* an addition to the number (1.05)
used to multiply to the current waviness angle each
step of the transition. The default, 5, would
cause the multiplier to be 1.05 + 5/100 = 1.10.
(Default 5)
- strip -- the width of the strips to use
(Default 4)
- replace -- the number of strips to replace with the new image
each time it performs replacements
(Default 5)
- amplitude -- the height of the waves
(Default 20)
- Wipe -- Wipe in the new image over the old one, as in painting it on
in a quick rotational swipe. The rotation is centered at the
pivot point.
Parameters:
- pic -- Specifies the name of the picture to show.
Must be the same as a key from the key=
parameter of a pic command.
(Required)
- pivot -- supports the following pivot points, where the wipe is
centered:
- TopLeft
- Top
- TopRight
- Left
- Center
- Right
- BottomLeft
- Bottom
- BottomRight
(Default Left)
- delay -- the delay time between transition steps
(Default 100)
- speed -- the number of degrees to add to the rotation sweep in
each step
(Default 5)
- strip -- the width of the horizontal strips to use
(Default 3)
- clockwise -- 1 is a clockwise wipe, -1 is counter-clockwise
(Default 1)
Description of Delay Commands
- DecayDelay -- Cause the current image to decay during a delay period.
Parameters:
- <non-negint> -- The first word is the total time to delay
(Default 1000)
- delay -- the delay time between transition steps
(Default 50)
- speed -- the number of blocks to decay in each step
(Default 10)
- size -- the size of the blocks to use for the decaying
(Default 10)
- gravity -- the maximum downward pull on the blocks
(Default 3)
- delay -- Delay for a specified duration
Parameters:
- <non-negint> -- The first word is the total time to delay
(Default 1000)
- WavyDelay -- Have the current image wave around during a delay period.
Parameters:
- <non-negint> -- The first word is the total time to delay
(Default 1000)
- dir -- supports these directions:
- Horizontal -- the strips of the image are horizontal
and slide left and right
- Vertical -- the strips of the image are vertical
and slide up and down
(Default Horizontal)
- delay -- the delay time between transition steps
(Default 50)
- theta -- the wavyness of the image (bigger theta = bigger ripples)
(Default size*8)
- strip -- the width of the strips to use
(Default 5)
- amplitude -- the height of the waves
(Default 20)
Example Script
The following example declares four images, one which is pure
black, and the others being actual gifs which will be padded
with the default black to make them all the same size.
It may be helpful to see
SlideViewer perform the script.
!**********************************************************
! Short Example Script
!**********************************************************
pic key=black rgb=0,0,0
pic key=coast url=pics/ca_coast7.gif
pic key=storm url=pics/glacier_storm_bw.gif
pic key=bridge url=pics/gldn_bridge1.gif
do
! Show the first image
appear pic=coast
delay 2000
! Wipe on the storm image
wipe pic=storm delay=30 speed=5 strip=2 pivot=TopLeft clockwise=1
delay 2000
! PixelIn the bridge image
pixelin pic=bridge delay=30 pixelSize=6
delay 2000
! Rotate to black
rotate dir=vertical pic=black delay=50 strip=2 speed=7
delay 2000
! Fade in the first image
fadeIn pic=coast delay=50 speed=4
! Repeat infinitely
repeat times=-1
SlideViewer was written and is Copyright © 1995 by
Mike Crider