Script Center
Dhtml Scripts Free Scripts > ZoomingText
You can see the zooming text at the top of the screen.
Cut And Paste This Code Into Your WebPage:
<script language="JavaScript1.2"> /******************************************************************************** Copyright (C) 1999 Thomas Brattli This script is made by and copyrighted to Thomas Brattli at www.bratta.com Visit for more great scripts. This may be used freely as long as this msg is intact! ********************************************************************************/ /*If you want the text to appear differently on another place on the page or 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('www','evrsoft','com','www.evrsoft.com') //the color of the text: color="#000000" //set the size you want the zoom to start at: var startSize=70 //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=30 //Set font var 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=startSize var gonum=0 /*Browsercheck and settings vars ****************************************************************************/ var ie, n; if (document.all) { n=0 ie=1 zoomText='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=0 zoomText="" 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 ie5 document.all.divZoom.style.width=document.body.offsetWidth-50 document.all.divZoom.style.color=color document.all.divZoom.style.fontFamily=font } if(ie || n) go(0) } function go(num){ gonum+=1 size=startSize if(num<text.length){ zoom(num,'go('+gonum+')') }else{ hideIt() } } function playAgain(){ size=startSize gonum=0 if(ie) document.all.divZoom.style.visibility='visible' else if(n) document.layers.divZoom.visibility='visible' zoomInit() } //*************************************************************************** </script> </head> <body bgcolor="#ffffff"> <!-- Ensure that the color is changed, e.g if zoom text is Black, the bgcolor should be white --> <!--This is the zoom div/layer, to change the appearans of this just change the stuff you want in the style tag. But remeber you can only change width, top, height, left and that sorta stuff, if not you have to set them in the ns write thing as well.--> <div id="divZoom" align="center" style="position:absolute; top:1"></div>
Rate This Script : 10 - Best 9 8 7 6 5 - Ok 4 3 2 1 - Rubbish
HTML Studio's Main Page
Dhtml Scripts
Copyright © 2000 Nick Grant. All Rights Reserved.