|
How do I create a screensaver
using JavaScript, or a .js file?
Creating a screen saver
from JavaScript is easier than you might think. Active Screen
Saver Personal/DevKit displays any JavaScript just like your web
browser.
A lot of screen savers feature JavaScript
animations, and if
you've been searching the Internet, you may have found a JavsScript
Animations you'd
like to add to your own screen saver. This guide will help you to do just
that.
More
Information:
View
JavaScript Text Animation (Click Me)
The initial JavaScript Animations on this page were
created using Microsoft FontPage, while the "View
JavaScript Text Animation" (Code at bottom) was created
manually. If you would like to animate a particular HTML element
using Microsoft FrontPage, simply do the following:
Animating a page element (FrontPage 2000)
You can apply Dynamic HTML (DHTML) animation effects to just about
anything on a page text, paragraphs, pictures, buttons, marquees,
and so on and tie the effect to a trigger event, such as clicking
a mouse, pointing a mouse, loading a page, and so on. You can create an
animation that makes text fly in from the right when the page is loaded,
as in the following example:
- Select the page element you want to animate, and then click Dynamic
HTML Effects on the Format menu.
The DHTML Effects toolbar is displayed.
- In the On box, click the down arrow, and then
select the event that will trigger the animation:
- To start the animation when a site visitor points to the page
element and clicks the left mouse button once, select Click.
- To start the animation when a site visitor points to the page
element and double-clicks the left mouse button, select Double
click.
- To start the animation when a site visitor points to and rests
on the page element, select Mouse over.
- To start the animation when the page is loaded in a site
visitor's browser, select Page load.
Note The events listed in the On
box depend on the type of page element you selected.
- In the Apply box, click the down arrow, and then
select the type of animation effect you want to occur:
- To apply an animation that moves a page element, click Fly
out, Fly in, Drop in by word,
Elastic, or one of the other movement animations.
- To apply an animation that changes the appearance of the page
element, such as changing a font color or applying a border
effect, click Formatting.
- If you selected a picture, to apply an animation that swaps the
picture with another one, click Swap picture.
Note The effects listed in the Apply
box depend on the type of page element you selected, and on the type
of event you selected in step 2.
- In the Choose Settings box, click the down arrow,
and then choose the settings for the effect:
- If you applied Fly out animation in step 3,
select the direction or type of movement, such as to left
or to top-right by word.
- If you applied Formatting animation in step 3,
select Choose font to change the font style,
size, color, effects, or character spacing, or select Choose
border to change the border or shading.
- If you selected a picture and a Swap picture
effect in step 3, click Choose picture and then
select the picture to swap on the event you selected in step 2.
Note The settings listed in the Choose
Settings box depend on the type of page element you selected
and the type of effect you selected in the Apply box.
Tips
- The best way to determine the type of animation you want is to
experiment by applying different events and effects and then
previewing the page in a browser. To preview the page, click the Preview
tab, or click Preview in Browser on the File
menu.
- To remove the effect, click Remove Effect on the DHTML
Effects toolbar. You can also remove animation in Page view
by selecting the page element and pressing CTRL+SPACEBAR.
- You can copy animation from one page element to another by using Format
Painter . Select the element whose animation you want to
copy, click Format Painter , and then click the page
element to which you want to apply the animation.
- You can apply multiple effects to most page elements. For example,
you can animate text to fly in from the right when the page is loaded,
and then add a border around the text that is displayed when a site
visitor clicks it.
View JavaScript
Text Animation - Source Code
<HTML>
<head>
<script>
<!--
function nextSize(i,incMethod,textLength)
{
if (incMethod == 1) return (72*Math.abs( Math.sin(i/(textLength/3.14)))
);
if (incMethod == 2) return (255*Math.abs( Math.cos(i/(textLength/3.14))));
}
function sizeCycle(text,method,dis)
{
output = "";
for (i = 0; i < text.length; i++)
{
size = parseInt(nextSize(i +dis,method,text.length));
output += "<font style='font-size: "+ size
+"pt'>" +text.substring(i,i+1)+ "</font>";
}
theDiv.innerHTML = output;
}
function doWave(n)
{
theText = "JavaScript Animation!";
sizeCycle(theText,1,n);
if (n > theText.length) {n=0}
setTimeout("doWave(" + (n+1) + ")", 50);
}
// -->
</script>
</head>
<body onLoad= "doWave(0);"
bgcolor="#FFFFFF">
<div ID= "theDiv"
align="center">
</div>
</body>
</html>
For more help, you can try posting a message to one of the Active
Screen Saver discussion groups
Free Freeware Shareware macromedia Macromedia Flash flash director ActiveX 3D AVI avi gif GIF mpeg MPEG JPEG jpeg jpg JPG MP3 VBScript class Java JavaScript WAV wav BMP bmp PowerPoint ppt jpg QuickTime Audio CD PNG png Kiosk kiosk KIOSK ocx OCX .js js htm HTML HTM html vbs Christmas Screensavers Halloween Screensaver Matrix Screensaver Thanksgiving Screensaver Christmas Free Screensaver Screensaver Downloads 3D Screensavers New And Brand New Screensavers And Themes Audio MP3 MediaPlayer Xing WAV RealAudio LiquidAudio Cresendo AIFF/AU Video Vivo QuickTime AVI MediaPlayer Xing MPEG(1), (2) vxtreme RealVideo Animation QuickTime AVI VRML MediaPlayer RealFlash MPEG(1), (2) Java Flash Shockwave RealVideo Cult 3D Interactive RealSpace VR VRML QTVR VDOPlayer ThingMaker Java Ipix Flash Blaxxun Shockwave DWG DXF (Data Exchange File) DWF Drawing Web Format Converter Windows Free Flash Screensaver Screensaver With Flash Flash Screensaver Converter Windows Flash 3 Shockwave Screensavers Flash Screensaver Converter Windows Shareware E-cards Tutorial Examples Menu Cookie Control Worlds Bryce Clock Pipes Movie MPG Software Win95 Gifs midi Animated Transparent Create From Photo Slideshow Player of Files Games Format Background Changer Sounds Icons Internet Aurora All Make your own Webbing Marketing South Park Over Tutorials live Kiosks Ktsc-19sy Ottawa History Mall airport tradeshow Amovie VB Ctrl Alt Vb NT Sample Code theme screen saver dreamweaver authorware freehand After Dark CineMac Digital Cafe hotspot hello winsite hotjava bytecodes jvms applets simplest cntl cgi Java Script Perl xml Linux screentime multimedia royalty free maker builder screen saver factory
|