www.webdeveloper.com
Results 1 to 8 of 8

Thread: marquee image scroller

Hybrid View

  1. #1
    Join Date
    Jun 2005
    Posts
    26

    marquee image scroller

    I've taken a 360 degree image that I want to continuously scroll. I've found a marquee scroller that works but it leaves gaps between the images. Idealy it would the picture would continue to scroll and never see a start or finish. Also is there a way to make it loop one picture instead of having a play list? I've seen other ways of doing this but I think I have to keep it as a marquee.

    Here's the code I'm currently using:

    <MARQUEE style="border: 0px none; width:400px; height:120px; " direction="left" behavior="scroll" scrollamount="3" ><img src="http://www.mysite.com/images/360.png"><img src="http://www.mysite.com/images/360.png">

    thanks for any help.

  2. #2
    Join Date
    Dec 2005
    Location
    American, living in Toronto, ON. CANADA
    Posts
    6,746
    <MARQUEE style="border: 0px none; width:400px; height:120px; " direction="left" behavior="scroll" scrollamount="3" ><img src="http://www.mysite.com/images/360.png" style="border:0 none;"><img src="http://www.mysite.com/images/360.png" style="border:0 none;">

    You have "0px none;" for the marquee, but you want "0px none;" for the image too. This might solve the problem, but unless I tested it myself, I cannot be sure that this will correct the problem.
    You'll also want to re-name those images to begin with a alphabeic letter (e.g., "a360.jpg", not "360.jpg"). Don't use a number for the first character of an image file. This can cause problems for some.
    Last edited by WebJoel; 08-18-2006 at 08:12 AM.

  3. #3
    Join Date
    Jan 2004
    Location
    chertsey, a small town s.w. of london, england.
    Posts
    1,467
    Hi there xover15,

    You will not be able to have a gap-free scroll using the marquee element.
    Instead you will need to use javascript to achieve this effect.

    Here you may see a simple example...
    ...and here is the code...
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
       "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    <title>passing clouds</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    
    <style type="text/css">
    <!--
    body {
        margin:20px 0;
        background-color:#333;
        color:#fff;
     }
    h1 {
        font-size:24px;
        text-align:center;
     }
    #container {
        height:125px;
        background-image:url(images/floating_clouds.jpg);
        border-top:2px solid #000;
        border-bottom:2px solid #000;
        margin-top:50px;
     }
    -->
    </style>
    
    <script type="text/javascript">
    <!--
    
      var p=0;
      var speed=50;   // vary this to suit, larger value - slower speed
    
    window.onload=function() {
       clouds();
     }
    function clouds() {
    
       document.getElementById('container').style.backgroundPosition=p+'px 0';
    
       p++;    //change this to p-- for right to left direction
    
    setTimeout('clouds()',speed);
     }
    //-->
    </script>
    
    </head>
    <body>
    
    <h1>passing clouds</h1>
    
    <div id="container"></div>
    
    </body>
    </html>
    coothead

  4. #4
    Join Date
    Dec 2005
    Location
    American, living in Toronto, ON. CANADA
    Posts
    6,746
    Upon review of what makes the 'gap' in a slideshow, I would now agree... you'll need a 'gapless' javascript to acheive this.
    There might be such a thing at:
    www.dynamicdrive.com
    in their slideshow or gallery section...

  5. #5
    Join Date
    Jan 2004
    Location
    chertsey, a small town s.w. of london, england.
    Posts
    1,467
    Hi there WebJoel,

    why would you suggest that xover15 goes to...
    dynamicdrive.com
    ...for a script, when I have just supplied him with one.

    Do you consider mine inadequate for his requirements.

    coothead

  6. #6
    Join Date
    Jun 2005
    Posts
    26
    Thanks to you both for your help. I'll see if I can get the javascript to work although I think I have to use a marquee for the current situation. I'll try it out tonight and get back.

  7. #7
    Join Date
    Jun 2005
    Posts
    26
    I ended up having to use flash because myspace doesn't handle javascript to my knowlege. Thanks for your help on the subject.

    myspace.com/xover15

  8. #8
    Join Date
    Aug 2006
    Posts
    1

    Using the marquee one and adding links

    What would I need to do to also make each of these pictures in my marquee a link that either opened a new window or a popup like 3x the size of the marquee?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles