...

View Full Version : Trying to make a marquee loop...



wontgetlost
10-04-2003, 07:00 PM
I have a marquee on my Forum which works great and fades in and out just right. Problem is, I'd like it to loop so that it doesn't wait all the way until it's done scrolling before it starts over again.
Here's the code:


<marquee onmouseover="this.stop()" onmouseout="this.start()" direction="left" scrollamount="3" style="Filter:Alpha(Opacity=100, FinishOpacity=5, Style=2, StartX=45, StartY=0, FinishX=0, FinishY=0);" scrolldelay="1">
[Future Affiliates go here! ]
</marquee>

Here's the site:
http://littleariel.proboards19.com/index.cgi
The marquee is at the bottom of the page.
BTW, in case you're wondering, I know I don't have any buttons there now but I already know that if I add, say 20 link buttons to the marquee, it scrolls all 20 across until they're all done and off the page... and only then will it start over again. I'd like it to loop continuously with no gaps.
Thanks in advance for your assistance :)

me'
10-05-2003, 11:44 AM
Two problems with your code:

1) <marquee> is depreciated.
2) Filter: only works in IE.

wontgetlost
10-05-2003, 02:12 PM
Originally posted by me'
Two problems with your code:

1) <marquee> is depreciated.
2) Filter: only works in IE.

Thanks for your reply :)
I understand this script/code is not cross browser compatible... no problem. All I'm trying to do is to get rid of the gap between the ending and the begining.. I'd like to not have to wait for the end of the marquee to go off the screen before it starts all over again.

me'
10-05-2003, 03:15 PM
Then write whatever has to go in the marquee more than once.

Willy Duitt
10-05-2003, 08:20 PM
Try changing:
scrolldelay="1"

To:
scrolldelay="0"

wontgetlost
10-11-2003, 02:30 PM
Hi there and thanks for the replys.
Unfortunately changing "scrolldelay" to 0 did not help.
I'm really bummed that there isn't a better solution than "Then write whatever has to go in the marquee more than once."
I've gotto believe that someone out there knows something :)

Willy Duitt
10-12-2003, 12:41 AM
This does not actually solve your problem, but it will loop
the marqueecontents 10x's before pausing to start again.

<script type="text/javascript">

// Specify the marquee contents
var marqueecontents=('<img src="http://wontgetlost.com/arielswimleft.gif" /> Hello and welcome to LittleAriel Forum !! <img src="http://wontgetlost.com/ArielSmiley.gif" /> Thanks for swimming by and have a GREAT Ariel day!! <img src="http://wontgetlost.com/arielswimleft.gif" /> ');

str = marqueecontents;
str = str+str+str+str+str
str = str+str+str+str+str

if (document.all){
document.write('<marquee onmouseover="this.stop()" onmouseout="this.start()" direction="left" scrollamount="5" style="Filter:Alpha(Opacity=100, FinishOpacity=5, Style=1, StartX=45, StartY=0, FinishX=0, FinishY=0); font-weight: bold;" scrolldelay="0">'+str+'</marquee>');
}

</script>


You could also put your marquee contents into an Array()
and loop thru the Array. It would make it easier to add links
and/or text.

......Willy

wontgetlost
10-13-2003, 11:42 PM
Thanks for the GREAT solution!
If it's not too much of a problem, maybe you could let me know how to loop the marquee contents through the use of an array()
I'm not familiar with this..
Thanks in advance http://wontgetlost.com/Asmiling.gif

Willy Duitt
10-14-2003, 04:42 AM
That wasn't my solution.
It was Me' who suggested:


"Then write whatever has to go in the marquee more than once."


I'm sure there are better ways of doing it but,
that was what I mashed together at the time. :D


Below is an example of an Array:

<script type="text/javascript">

// Specify the marquee contents
var marqueecontents = new Array(5)
marqueecontents[0] = ('<img src="http://wontgetlost.com/arielswimleft.gif" />');
marqueecontents[1] = ('Hello and welcome to LittleAriel Forum !!');
marqueecontents[2] = ('<img src="http://wontgetlost.com/ArielSmiley.gif" />');
marqueecontents[3] = ('Thanks for swimming by and have a GREAT Ariel day!!');
marqueecontents[4] = ('<img src="http://wontgetlost.com/arielswimleft.gif" />');

var i=0;
for (i=0; i<5; i++)

alert(marqueecontents[i]);

</script>


.....Willy



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum