este codigo javascript simula un efecto muy parecido al que utilizan las peliculas de flash (.swf), muy bueno!
<!--
quotation scroller v1.0 by angus turnbull http://gusnz.cjb.net updated: 15 feb 2001
secondary redirect: http://www.bigfoot.com/~angus_rt
-->
<html><title> text effects flash</title>
<body bgcolor="#ffffff" scroll="no">
<script type="text/javascript">
<!-- // hide
var isdom = false, isns4 = false;
if (document.all) var isdom = true, docobj = 'document.all.', styobj = '.style';
else if (document.layers) var isns4 = true, docobj = 'document.', styobj = '';
var quotes = new array(); c = 0;
quotes[c] = 'so long, and thanks for all the fish'; c++;
quotes[c] = 'yomama so...'; c++;
quotes[c] = 'nothing lasts forever but the tomato'; c++;
quotes[c] = 'mmmm... chocolaaateahrghlly...'; c++;
quotes[c] = 'very funny scotty, now beam down my clothes!'; c++;
quotes[c] = 'who let the dogs out?'; c++;
quotes[c] = 'dang it... the boy ain\'t right'; c++;
quotes[c] = 'shrimp gumbo, shrimp patties, shrimp...'; c++;
quotes[c] = 'och aye th\' noo!'; c++;
quotes[c] = 'respect my authoritaah!'; c++;
quotes[c] = 'so cunning you could stick a tail on it and call it a weasel'; c++;
quotes[c] = 'and i\'d say, "oi! you! no!"'; c++;
quotes[c] = 'that\'s a one, spicy! meat-a-ball!'; c++;
quotes[c] = 'the world is a vampire...'; c++;
quotes[c] = 'this is the quote that never ends...'; c++;
quotes[c] = 'screeew you guys, i\'m going home'; c++;
quotes[c] = 'the earth is full. go home!'; c++;
quotes[c] = 'so many pedestrians, so little time...'; c++;
var visquotes = 10; // maximum onscreen at once.
var sdivsty = new array(visquotes);
var sdivref = new array(visquotes);
var speed = new array(visquotes);
// left: low speed colours (lighter) .... right: high speed colours (darker).
var colours = new array('b2c7de','a4bcd8','96b2d2','88a8cc','7a9ec6','6c94c0','5e89ba');
function checkdivs()
{
for (i = 0; i < visquotes; i++)
{
// if it's moved offscreen to the left (or starting), set things in motion...
if (parseint(sdivsty[i].left) < (0 - (isdom ? sdivref[i].clientwidth : sdivsty[i].clip.width)))
{
speed[i] = math.floor(math.random() * 56) + 8; // varies: 8 to 63.
// off to the right it goes.
sdivsty[i].left = (isdom ? document.body.clientwidth : window.innerwidth) + math.random() * 50;
// write a quote in a colour that depends on the speed.
/* stylesheets - guess which browser has bugs :)
*
* divtext = '<nobr><span style="font: ' + speed[i] + 'px arial, helvetica; ' +
* 'color: #' + colours[math.floor(speed[i] / 8) - 1] + '">' +
* quotes[math.floor(math.random() * quotes.length)] + '</span></nobr>';
*/
fontsize = math.floor(speed[i] / 8) - 1;
divtext = '<nobr><font face="arial, helvetica" size="' + fontsize + '" color="#' +
colours[fontsize] + '">' + quotes[math.floor(math.random() * quotes.length)] +
'</font></nobr>';
if (isdom) sdivref[i].innerhtml = divtext;
if (isns4)
{
sdivref[i].document.write(divtext);
sdivref[i].document.close();
}
// position and layer it according to its speed (faster = higher).
sdivsty[i].zindex = speed[i];
topmax = (isdom ? document.body.clientheight : innerheight) - speed[i];
sdivsty[i].top = topmax * math.random();
}
// all items: keep 'em moving left.
sdivsty[i].left = parseint(sdivsty[i].left) - (speed[i] / 4);
}
}
function initdivs()
{
for (i = 0; i < visquotes; i++)
{
divid = 'sdiv' + i.tostring();
if (isdom) document.write('<div id="' + divid + '" style="position: absolute; left: -1000"> </div>');
// have to use layers, divs are buggy as..... in ns. again.
if (isns4) document.write('<layer id="' + divid + '" left="-1000"> </layer>');
sdivref[i] = eval(docobj + 'sdiv' + i);
sdivsty[i] = eval(docobj + 'sdiv' + i + styobj);
}
setinterval('checkdivs()', 50);
}
if (isdom || isns4) initdivs();
// end hide -->
</script>
<div id="maintext" style="position: absolute; left: 100; top: 200; z-index: 100">
<h1>'ello 'ello 'ello what 'ave we 'ere then?</h1>
<div>
</body>
</html>
Download Script
Ver ejemplo javascript