ScrollM
(final)
By Morgan Andersson 2001
What is ScrollM ?
This program is 4kb scroll that scroll both ways.
You can make it look the way you want it to look by
Changing the Fontcolor
Changing the Background color
Changing the Speed in
milliseconds
Changing the Speed in
pixels
Changing the Font Size
Changing the Font Type
Hold down a mousebutton
to stop the scrolling.
All this, and It's totally free to use.
What should include in the zipfile ?
ScrollM.zip
ScrollM.class
ScrollM.java
ScrollM.html
ScrollM_doc.htm
Installation instructions:
Below you see a typical html setup for the scroll, I will explain everything bit by bit ..
<html>
<head><title>Scrolltext</title></head>
<body>
<h1>Scrolltext</h1>
<p>
<applet code="ScrollM012.class" width="200" height="12">
<param name="text" value="ScrollM, Written by Morgan
Andersson @ www.mogge3d.com">
<param name="textcolor"
value="00FF00">
<param name="bgcolor" value="000000">
<param name="msleft"
value="20">
<param name="msright" value="10">
<param name="pixleft"
value="1">
<param name="pixright" value="1">
<param name="fontsize"
value="10">
<param name="fontname" value="Verdana">
</applet></p>
</body></html>
Explanations:
<html>
<head><title>Scrolltext</title></head>
<body>
<h1>Scrolltext</h1>
<p>
<applet code="ScrollM012.class" width="200" height="12">
^ Typical html start, loads the applet, I will not explain this, only the parameters ..
<param name="text" value="Type your text here">
^ This section will be the actual text that appears in the applet box
<param name="textcolor" value="00FF00">
^ Here you have
the color of the text add values from 000000 to FFFFFF, for example if you want
the text to be red enter
^ the value FF0000 or for green 00FF00 end finally blue 0000FF or if you'd like
to mix some more for example if
^ you type FFFF00 you'd get a yellow color or for 002672 you'd get a dark blue,
try to mix for desired result, the best thing
^ is if you have a paint program that displays the color values in hex, or tell
me and I'll make one...
<param name="bgcolor" value="000000">
^ This is the same as for the textcolor except that this is the color for the background.
<param name="msleft"
value="20">
<param name="msright" value="10">
^ Here we have
the speed of the scroll, the scroll is moving 1 pixel (default) each time and
the value 20 on msleft means that every
^ 20ms the scroll will move one more pixel to the left, if you'd put 1000 (1
second) the scroll would be terrible slow, practically
^ unusable. Same with msright but this is the speed when the scroll is moving
to the right.
<param name="pixleft"
value="1">
<param name="pixright" value="1">
^ pixleft and pixright
is also speedsettings, you'll type in number of pixels the scroll will move
for every time the milliseconds have
^ past. For example, if you'll have msleft on value 20 and pixleft on value
1 the scroll would move left 1 pixel a time for ever 20
^ millisecond, or for example, if you'd type the value 40 on msright and 5 on
pixright would mean that every 40 millisecond the
^ scroll will move 5 pixels to the right. Try to mix msleft, msright, pixleft
and pixright for desired speed.
<param name="fontsize" value="10">
^ Here is the size of the scroll, type what fits your need values from 10 to 50 is the most common.
<param name="fontname" value="Verdana">
^ Here is the type
of the font, please nose that this is CASE SENSITIVE and one wrong spelling
will cause the applet not to
^ work. Examples of types are : Verdana, TimesRoman ..
</applet></p>
</body></html>
^ End of html document ..
Default Values:
Parameter: | What is this ? | Default Value: |
text1 | Text of the scroll if you don't add this parameter to your html document | Error, Please refer to the doc file |
textcolor | Text color | FFFFFF |
bgcolor | Background color | 000000 |
speedleft | Movement delay of scroll moving left in milliseconds | 20 |
speedright | Movement delay of scroll moving right in milliseconds | 20 |
pixleft | Movement distance in pixels when scroll is moving left | 1 |
pixright | Movement distance in pixels when scroll is moving right | 1 |
fontsize | Size of the font | 10 |
fontname | Font type | Verdana |
Update Notes:
v0.01 (2001-06-11)
:
Started on the scroll, just enough to make it move.
v0.02 (no date)
:
I added fontmetrics so the program automatically knows when the end of the text
is, when the end of the
text comes the scroll change direction, in v0.01 I had to set it manually which
meant that every time
I changed the text I had to change how many pixels the text would scroll before
scrolling back.
v0.03 (no date):
Added Stopscroll when any mousebutton is pressed.
v0.04 (2001-06-24)
:
Added so the scroll knows the height and width of the applet box, so no matter
the size of the
applet box the scroll will always start at far end right side of the box and
it is now also centered in
the vertical direction.
v0.05 (2001-06-25)
:
cleaned up the code a bit.
v0.06 (2001-06-25)
:
Added getParameter for the scrolltext, so now all you have to do is to add a
line in your html file to
change the text of the scroll.
v0.07 to v0.12
(2001.06.26) :
Added getparameter for the textcolor, bgcolor msleft and msright, fontsize and
fontname.
I also added default values to all parameters in case of no input in the html
file.
v0.13 (2001.06.29):
Changed the color parameters so instead of writing a separate line for the red,
green and the blue color
it's now on a single line as hex, for example, red FF0000, green 00FF00, blue
0000FF.
v0.14 (2001.06.30):
Added pixleft and pixright so it's now easier to fine-tune the speed. Combine
it with msleft and msright
to get the desired result on your scrolls movement.
v0.14 (2001.07.20)
FINAL:
I decided to make a final release of this program, the last release was 0.12
so there are some new features since the
last. Today I've been doing this documentation a bit more properly. I will not
do anything more on this program.
I'm also releasing the source code. Now, enjoy the program.
Notes about source code (ScrollM.java):
You may use this
code for your own learning process to study.
If you wish to make any changes in the code and compile it, then
please, the least you can do is to have a link to my webpage on
the webpage where the class-file is used.
Thank you,
Morgan Andersson.
Webpage : www.mogge3d.com
e-mail : morgan@mogge3d.com
Any joboffers are welcome ...