Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    New Coder
    Join Date
    Aug 2002
    Location
    WA
    Posts
    67
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Trying to make a marquee loop...

    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:
    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
    Have a GREAT Ariel day!!
    Mike
    LittleAriel.com

  • #2
    me'
    me' is offline
    Senior Coder
    Join Date
    Nov 2002
    Location
    Warwickshire, England
    Posts
    1,229
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Two problems with your code:

    1) <marquee> is depreciated.
    2) Filter: only works in IE.
    David House - Perfect is achieved, not when there is nothing left to add, but when there is nothing left to take away. (Antoine de St. Exupery).
    W3Schools | XHTML Validator | CSS Validator | Colours | Typography | HTML&CSS FAQ | Go get Mozilla Now | I blog!

  • #3
    New Coder
    Join Date
    Aug 2002
    Location
    WA
    Posts
    67
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    Have a GREAT Ariel day!!
    Mike
    LittleAriel.com

  • #4
    me'
    me' is offline
    Senior Coder
    Join Date
    Nov 2002
    Location
    Warwickshire, England
    Posts
    1,229
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Then write whatever has to go in the marquee more than once.
    David House - Perfect is achieved, not when there is nothing left to add, but when there is nothing left to take away. (Antoine de St. Exupery).
    W3Schools | XHTML Validator | CSS Validator | Colours | Typography | HTML&CSS FAQ | Go get Mozilla Now | I blog!

  • #5
    Banned
    Join Date
    Sep 2003
    Posts
    3,620
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Try changing:
    scrolldelay="1"

    To:
    scrolldelay="0"

  • #6
    New Coder
    Join Date
    Aug 2002
    Location
    WA
    Posts
    67
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Still not working...

    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
    Have a GREAT Ariel day!!
    Mike
    LittleAriel.com

  • #7
    Banned
    Join Date
    Sep 2003
    Posts
    3,620
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #8
    New Coder
    Join Date
    Aug 2002
    Location
    WA
    Posts
    67
    Thanks
    0
    Thanked 0 Times in 0 Posts

    That did it!

    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
    Have a GREAT Ariel day!!
    Mike
    LittleAriel.com

  • #9
    Banned
    Join Date
    Sep 2003
    Posts
    3,620
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.


    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •