Results 1 to 8 of 8

Thread: Alternating Marquee!

  1. #1
    Join Date
    Mar 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Alternating Marquee!

    Hi guys, i was just wondering if any one knew how to create an alternating marquee in DHTML, by alternating i mean one that alternates between different lines of text.

    im trying to create a news marquee for a site im making for my dissertation and im properly lost with it

    any help would be appreciated, cheers

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Could you not just combine the two lines into one that keeps scrolling?
    Add some spaces between them, so you get them spaced out ("seperate") if you desire.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Mar 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    yeah thats my backup plan just to lump them all into a normal marquee but it would look better if i could get it to work the other way. anyone any ideas at all?

  4. #4
    Join Date
    Feb 2007
    Posts
    16
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    You could write a script that pulls the text randomly from a csv file.

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    You should have a look at the scripts on this index and see if any of them might work for you or be close:

    http://www.dynamicdrive.com/dynamicindex2/index.html
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #6
    Join Date
    Mar 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanks a lot, theres a few there that i could use, will just need to configure the code and mix and match from a few of them, thanks

  7. #7
    Join Date
    Mar 2007
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    back to bother you guys again. I decided to go with this code for my banner http://www.dynamicdrive.com/dynamicindex2/typescroll.htm but i cant seem to modify it very much, im trying to modify the background colour and the font and the speed (although i havnt looked at the speed much yet). The way the style for the font seems to be set is in variables i.e. var_ts fontsize="14px". how would i go about changing other properties of this scroller?

    Cheers

  8. #8
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    The background-color and color are set here to match the page:

    Code:
    if (document.all||document.getElementById){
    document.write('<form name="bannerform">')
    document.write('<input type="text" name="banner" size="'+tscroller_width+'"')
    document.write('  style="background-color: '+document.bgColor+'; color: '+document.body.text+'; font-family: verdana; font-size: '+ts_fontsize+'; font-weight:bold; border: medium none" onfocus="blur()">')
    document.write('</form>')
    }
    You can hard code your own preferences like so:

    Code:
    if (document.all||document.getElementById){
    document.write('<form name="bannerform">')
    document.write('<input type="text" name="banner" size="'+tscroller_width+'"')
    document.write('  style="background-color: lightblue; color: navy; font-family: verdana; font-size: '+ts_fontsize+'; font-weight:bold; border: medium none" onfocus="blur()">')
    document.write('</form>')
    }
    There are two speed vectors in the script. One is how long between each message and is represented by the two:

    Code:
    setTimeout("nextstep()",1000)}
    statements. The larger this number, the longer the lag between messages. Both statements should be set to the same number. It represents milliseconds.

    The other speed vector is how rapidly each letter gets banged out. It is set here:

    Code:
    setTimeout("animate()",25)}
    Once again, the larger this number, the slower this vector will be.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

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