Scroller Applet (new version 1.2) Author : (c)1997 RJHM van den Bergh. rvdb@nedernet.nl This applet is free for non commercial purposes. Please send $5.-- to : RJHM van den Bergh Aldenhof 67-24 6537 DC NIJMEGEN NETHERLANDS It's a compensation for my free time and expenses. Commercial users please pay the $5.-- Or make a small link to my site http://www.nedernet.nl/~rvdb DISCLAIMER : Because off the low price we do not except any claims. Using the applet is at your own risk. --------------------------------------------------------------------------------------------------------------------------------- INSTRUCTIONS : 1 insert the following text in your homepage . Do it at the place where you want the shaking picture. Sorry your browser doesn't support java 2 Also put the file Scroller.class at your providers computer. If you use this example at the same place as your homepage file. (Don't forget the letter casing , unix computers are case sensitive) 3 Of course you must put your graphics file on the providers computer to. You can plase it in another directory. But then you have to change the picture parameter . example change "scroller.gif" to "directoryname/scroller.gif" Offcourse you don't have to use the scroller.gif file. Any file will do it will be reshaped at the applet width and height So the filesize isn't important. ---------------------- COMMEN MADE MISTAKES. Java is case sensitive. 1: In my programs I only use small letters for the parameter names. If you don't it will not work on all computer types. 2: You use an FTP (file transvere protocol) program to upload the files to the your ISP(internet servic provider). If you use windows95 be sure to use a windows 95 and not a windows 3.1x FTP program. A windows3.1x program uses the short filename. So *.class will get *.cla also the letter cassing can be different. And if the borwser can't find the applet program it will not work. 3: also make sure you transfere the classfile as a binary file. DISCRIPTION OFF APPLET TAGS : Scroller.class is the name off the java program. Code tells the browser the name off the program. It's default expected to be in the same directory as the html file The width and the height are off the applet. NOTE : You can change the place where the class file is by using the codebase attribute. This is an optional atribute. Example : note : I've set all picture adresses relative to the class file adress. For more info email me. Here you let the applet now where he can finds your picture In this case scroller.gif at the same directory as the homepage Here you can specify a height and or with off the picture. The picture will be resized to that format. If you omit this tag the picture width or height will be resized to the applet size. This for slowing down the scrolling . It is the waiting time in miliseconds between each program cycle. This version 1.2 also supports a hexadecimal representation for the background color. It works the same as the BGCOLOR attribute in the tag. The old version only supported a decimal representation of a color. How you calculate the decimal RGB value of a color is explained the end of this letter. To use a decimal representation omit the # sign. If you omit this tag away the default color will be the same as from the browser. These two parameters determine the scrolling direction off the picture. In x and y direxction. The units are in tenth of pixels. If xadd is negative it goes from right to left. If xadd is positive it goes from left to right. If xadd is zero there is no horizontal movement. If yadd is negative it goes from bottom to top. if yadd is positive it goes from top to bottom. if yadd is zero then there is no vertical movement. You can specify a border. If you don't want a border set the value to zero. or omit the tag. The border always will have a color that goes from white to black. if you leave this tag away fillpictures will be false. It draws 1 row off pictures arround the original. It actualy is a try out . Technical it works , but practical it doesn't make much sense . It use is to make a contineous slide on a applet. It will only be true if value="true" . Sorry your browser doesn't support java This tag will be executed if a browser is used that doesn't support java. Any other html tag can be used in place of this one. This one will place a bold text saying sorry your browser doesn't support Java. This tag lets the browser now that no more applet tags will follow. ------------------------------------------------------------------------------------------- FAQ: 1: JAVA.LANG.APPLETSECURITY EXCEPTION Some applet will not work if started localy with an Explorer 3.01 3.02 and 4.0. But they will work if started from the net. Microsoft made a very rigid security ristriction on applets. There where many complains abouth this restriction, because it makes it impossible to test applets localy. There where many complains abouth this restriction so microsoft made it possible to install another Java Virtual Machine on the Explorer. http://www.microsoft.com/java/download/dl_vmsp2.htm Note: that this download only works if you haven't start an applet. So close the Ms Explorer and restart it and go to this url. ------------------------ CALCULATE A DECIMAL RGB VALUE: How to calculate a decimal representation of a color. RGB stands for red green and blue. If you mix these colors you can get any color you like. RGB consist out of: -the red component in bits 16-23, -the green component in bits 8-15, -the blue component in bits 0-7. So Value="255" is pure blue Value 65280 is pure green (in hexadeciamal it will be 00FF00) Value 16711680 is pure red (in hex this is FF0000) Value 16777215 is white (in hex this is FFFFFF) So if you fill in the backgroundcolor is white ----------------------- PLEASE REPORT BUGS to : This makes it possible to improve the applet. rvdb@nedernet.nl http://www.nedernet.nl/~rvdb