View Full Version : marquee speed control
dataflow
05-17-2006, 12:49 AM
i have a marquee script that makes a button, to make marquee text speedup
here is that script
<a href="javascript:scroller.scrollAmount=scroller.scrollAmount+1;">fast</a>
i tried this one to make it slow down but didnt work
<a href="javascript:scroller.scrollAmount=scroller.scrollAmount/1;">slow</a>
i tried other ways but couldnt get it to work
can anyone help :confused:
jscheuer1
05-17-2006, 03:56 AM
<a href="javascript:scroller.scrollAmount=scroller.scrollAmount/1;">slow</a>
That's dividing it by one. Any number divided by one equals itself. Try:
<a href="javascript:scroller.scrollAmount=(scroller.scrollAmount-1);">slow</a> Or even:
<a href="javascript:scroller.scrollAmount=parseInt(scroller.scrollAmount)-1;">slow</a>
If neither of these work, I'd need to see the full script in action to determine the problem(s).
Please post a link to the page on your site that contains the problematic script so we can check it out.
dataflow
05-17-2006, 07:55 AM
thanks for your reply but found way that works better for what i want
here is script just incase your interested
<table width="60%" height="200" border="2" align="center" cellpadding="2" cellspacing="2">
<tr>
<td height="300" align="right"><div align="left">
<marquee behavior=scroll id="scroller" width=100% scrollamount=5>
i used images here not text
</marquee>
</div></td>
</tr>
</table>
<div align="center">
<h2><font size="+2">| <a href="javascript:scroller.direction='left'">Forward</a>
| <a href="javascript:scroller.start()">Start</a> | <a href="javascript:scroller.stop()">Stop</a>
| <a href="javascript:scroller.direction='right'">Backward</a> | </font></h2>
<h2><font size="+2">| <a href="javascript:scroller.scrollAmount=scroller.scrollAmount*3-scroller.scrollAmount;">Faster</a>
| <a href="javascript:scroller.scrollAmount=scroller.scrollAmount*10/7-scroller.scrollAmount;">Slower</a>
| </font></h2>
any other way i did the faster and slower button made the images go in reverse after slowing down enough.
this way it doesnt go past scrollamount of 0 in both direction
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.