home *** CD-ROM | disk | FTP | other *** search
- #Things to add
- # Optional=Yes
-
- [Applet Details]
- AppletName=Screen Fade
- #ClassName=Lake.class
- Size=[VARIABLE];50,50
- Desc=This plugin fades the screen from one color to another, please note that it will only work on IE4.0 and Netscape 3.0 and above.
- PluginAuthor=Andrew Scott
- PluginAuthorEmail=andrewcs@beam.com.au
- AppletAuthor=Andrew Scott
- AppletHomepage=http://www.beam.com.au/
-
- #[Button 1]
- #Parameter=textstring
- #Desc=Enter the text to have scroll across the system bar.
- #Type=STRING
- #Name=Text to scroll
-
- [Onload Block]
- fadeout()
-
-
- [Head Block]
-
- function makearray(n)
- {
- this.length = n;
- for(var i;i <= n; i++)
- this[i] = 0;
- return this;
- }
-
- hexconvert = new makearray(16);
- for(var i=0;i<10;i++)
- hexconvert[i] = i;
- hexconvert[10]="a"; hexconvert[11]="b"; hexconvert[12]="c";
- hexconvert[13]="d"; hexconvert[14]="e"; hexconvert[15]="f";
-
- function hex(i)
- {
- if (i<0)
- return "00";
- else if (i > 255)
- return "ff";
- else
- return "" + hexconvert[Math.floor(i/16)] + hexconvert[i%16];
- }
-
- function setbgColor(r,g,b)
- {
- var hr=hex(r); var hg =hex(g); var hb=hex(b);
- document.bgColor = "#"+hr+hg+hb;
- }
-
- function fade(sr,sg,sb,er,eg,eb,step)
- {
- for(var i=0;i<=step;i++)
- {
- setbgColor(
- Math.floor(sr*((step-i)/step)+er*(i/step)),
- Math.floor(sg*((step-i)/step)+eg*(i/step)),
- Math.floor(sb*((step-i)/step)+eb*(i/step)));
- }
- }
-
- function fadein()
- {
- fade(255,255,255,0,0,0,16);
- }
-
- function fadeout()
- {
- fade(0,0,0,255,255,255,16);
- }
-
- fadeout();
-
-