BEC Scroller
|
|
B.E.C. Scroller is a self contained Java
Applet, which allows text and now images to be scrolled up the screen, and can be
embedded within any web page.
It supports a number of configurable
options such as font colour, speed, text messages etc. It even
supports background images (behind the scrolling text), including
transparent GIF's, and has the ability to hyperlink to any page, when
the scrolling text or image is clicked (with different hyperlinks for each).
You can even provide padding
settings, to restrict the area that the text or image can scroll within - this
is ideal for creating effects like the one shown below.
Image scrolling - to use
the scroller with images, simply use the special tag:
img src=<filename>
as the line of text to
scroll (in the msgx parameters - see below),
substituting the <filename> for the path to the image
file, relative to the HTML page that the applet is running from (not
relative to the BECScroller.class file). This special tag is
used to locate the image file. If the image cannot be loaded for
some reason (such as it does not exist), then the text line is
scrolled instead, showing the img src= line. This is useful for
seeing straight away, whether or not there is a problem with you
applet parameters.
Standard Applet parameters are used
to customise the appearance and behaviour of the applet. An
example is shown below, along
with the HTML code that is used to generate
that example.
Refer to your standard HTML
literature of web sites for more information on applets.
|
Example Scroller:
|
|
Parameters:
|
Applet
Parameter |
Notes |
Since
version |
author |
REQUIRED
- this parameter is provided so that people can see where the
applet is from (allowing us to provide it for free), it must
be set to:
B.E.C. Scroller written by B.E.C. Networks Limited - http://www.becnetworks.co.uk |
1.1 |
msg0 to msgx |
REQUIRED
- the actual lines of text to scroll
(msg0..msgx)
NOTE: to scroll an image instead of text, use
the syntax:
img src=filename
where filename is the path to the image you wish to
scroll. |
all
img src added with v1.3
|
url0 to urlx |
OPTIONAL
- the URL's to hyperlink to, corresponding with scroll's (url0..urlx) |
all |
target0 to targetx |
OPTIONAL
- the target frame (if used) for the hyperlinked page to jump to (target0..targetx)
- use standard HTML frame targets |
all |
numlines |
REQUIRED
- the number of lines of text that will be provided to scroll
through (e.g. if you have specified msg0, msg1 and msg2, then
numlines should be set to 3) |
all |
scrollspeed |
OPTIONAL
- the number of ms to wait between each move of the text - will default to 50ms if none specified
(the higher the number, the slower the text will scroll) |
all |
smoothness |
OPTIONAL
- the number of pixels to move the text with each scroll |
all |
waitattop |
OPTIONAL
- the number of ms for the text to stay at the top of the scroll, before the next scroll begins (ignored if the scrollofftop is true) |
all |
scrollofftop |
OPTIONAL
- true or false - defines if the text should scroll right off the top of the applet window or not |
all |
scrollunderbottom |
OPTIONAL
- true or false - determines if the text should begin scrolling from the bottom of the applet, or from under the applet |
all |
bg |
OPTIONAL
- sets the background colour (in RRGGBB hex value) |
all |
fg |
OPTIONAL
- sets the foreground (text) colour (in RRGGBB hex value) |
all |
hover |
OPTIONAL
- sets the colour of text when mouse hovers (in RRGGBB hex value) |
all |
font |
OPTIONAL
- the font that the scrolling text should be (note that this font will need to be available on the device viewing the applet, or a default system font will be used) |
all |
fontsize |
OPTIONAL
- the size of the scrolling text font |
all |
image |
OPTIONAL
- an image to include as the background to the applet
(transparent GIF's are supported) |
all |
toppad |
OPTIONAL
- number of pixels to indent the scrolling text from the top |
1.1 |
leftpad |
OPTIONAL
- number of pixels to indent the scrolling text from the left |
1.1 |
bottompad |
OPTIONAL
- number of pixels to indent the scrolling text from the
bottom |
1.1 |
rightpad |
OPTIONAL
- number of pixels to indent the scrolling text from the right |
1.1 |
mousearea |
OPTIONAL
- specify the area that causes the text to stop scrolling (set to
all (the default), pad or none) |
1.2 |
|
Example HTML
code for above scroller:
|
<applet width="224" height="256" code="BECScroller.class" align="center">
<param name="author" value="B.E.C. Scroller written by B.E.C. Networks Limited -
http://www.becnetworks.co.uk">
<param name="numlines" value="6">
<param name="bg" value="000000">
<param name="fg" value="ffffff">
<param name="fontsize" value="12">
<param name="hover" value="e78410">
<param name="image" value="scrolltv.gif">
<param name="msg0" value="Hover over this scroller to see the text stop scrolling, and the colour of the text change">
<param name="msg1" value="Note that we are using padding to get the text to scroll within a predefined area of the image">
<param name="msg2" value="Click this scroller now to go to the download page">
<param name="msg3" value="Click the scroller now to go to the B.E.C. Home page, and see how the scroller has been implemented there">
<param name="msg4" value="This line of text scrolling now, has got no hyperlink associated with it, so clicking will not go to a different page (text still stops scrolling)">
<param name="msg5" value="img src=bec_scroll2.jpg">
<param name="rightpad" value="92">
<param name="bottompad" value="54">
<param name="leftpad" value="52">
<param name="toppad" value="140">
<param name="scrollofftop" value="true">
<param name="scrollspeed" value="50">
<param name="scrollunderbottom" value="true">
<param name="smoothness" value="1">
<param name="target2" value="_self">
<param name="target3" value="_self">
<param name="url2" value="../../download.htm">
<param name="url3" value="../../index.html">
<param name="mousearea" value="pad">
</applet> |
|
|
B.E.C.
Scoller Version History
Version
1.3 |
|
- added the
ability to allow scrollable images
|
|
Version
1.2 |
|
- mouse cursor
will change to the defined linked cursor (e.g.
a hand) if the mouse is moved into the defined
text area, and there is a hyperlink associated
with that text message
- can define
what area is sensitive to the mouse to stop
scrolling and click to hyperlink (the entire
applet area, the padded area, or none)
|
|
Version
1.1 |
|
- inclusion of
padding parameters, to restrict the area in
which the text scrolls
|
|
Version
1.0 |
|
|
|
|
|
|
|