Full version: jsB@nk » Text » Animation » Reverse Zooming Text script
URL: https://www.javascriptbank.com/reverse-zooming-text-script.html
The script causes the text to seem to disappear into the distance. The script can easily be amended to leave the last line visible and static, if desired, though.
Full version: jsB@nk » Text » Animation » Reverse Zooming Text script
URL: https://www.javascriptbank.com/reverse-zooming-text-script.html
<SCRIPT language=JavaScript1.2>/*If you want the text to appear differently on another place on the pageor anything set that in the style tag of the zoom layer. Here are the variables you have to set: First the text:*/text=new Array('JavaScriptBank.com', 'Bank of over', '2000+ free JavaScripts')//the color of the text:color="#000000"//set the size you want the zoom to start at:var startSize=60//set the size you want the zoom to end at:var endSize=5//Set the speed you want it to zoom in (in milliseconds)var Zspeed=300//Set fontvar font='Arial Black'//do you want it to hide when its done? (true or false)var hide=true/*You can remove this if you don't wan't it to start right away.You can have it start if someone clicks a link (make a link like this:<a href="#" onclick="fadeInit()">Click to Zoomtext</a>)*/onload=zoomInit;/*You shouldn't really have to set anything below this point*************************************************************************************************************************************************************************************************************************************/var size=startSizevar gonum=0/*Browsercheck and settings vars****************************************************************************/var ie, n;if (document.all) {n=0ie=1zoomText='document.all.divZoom.innerText=text[num]'zoomSize='document.all.divZoom.style.fontSize=size'closeIt=""fadeColor="document.all.divZoom.style.color=color[num]"}if (document.layers) {n=1;ie=0zoomText=""zoomSize="document.divZoom.document.write('<p align=\"center\" style=\"font-family:'+font+'; font-size:'+size+'px; color:'+color+'\">'+text[num]+'</p>')"closeIt="document.divZoom.document.close()"fadeColor="document.divZoom.document.write('<p align=\"center\" style=\"font-family:'+font+'; font-size:'+endSize+'px; color:'+color+'\">'+text[numText-1]+'</p>')"}/*The functions for zooming text.****************************************************************************/function zoom(num,fn){if (size>endSize){eval(zoomText)eval(zoomSize)eval(closeIt) size-=10;setTimeout("zoom("+num+",'"+fn+"')",Zspeed)}else{eval(fn)}}/*This is the function that hides the layer after the zoom/color change****************************************************************************/function hideIt(){if(hide){if(ie)document.all.divZoom.style.visibility="hidden"if(n)document.layers.divZoom.visibility="hidden"}}/*This is the functions that calls the right function...or something :}****************************************************************************/function zoomInit(){if(ie){//Added to make it center in ie5document.all.divZoom.style.width=document.body.offsetWidth-50document.all.divZoom.style.color=colordocument.all.divZoom.style.fontFamily=font}if(ie || n) go(0)}function go(num){gonum+=1size=startSizeif(num<text.length){zoom(num,'go('+gonum+')')}else{hideIt()}}function playAgain(){size=startSizegonum=0if(ie) document.all.divZoom.style.visibility='visible'else if(n) document.layers.divZoom.visibility='visible'zoomInit()}//***************************************************************************</SCRIPT><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->
<DIV id=divZoom style="POSITION: absolute; TOP: 20px" align=center></DIV><DIV id=footer+text style="LEFT: 10px; POSITION: absolute; TOP: 200px"><LAYER top="200" left="10" name="footer+text"></DIV><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->