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 4 of 4
  1. #1
    New Coder
    Join Date
    May 2004
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Var Speed controls

    Ok heres the prob, in my site I have got a status bar message that goes from right to left once the page has loaded. It is controlled by a var speed control.

    var yourwords = "* *PyRo* *";
    var buffer1=" ";
    var buffer2=" ";
    var message1=buffer1+yourwords+buffer2;
    var dir = "left";
    var speed = 50;
    function pingpong()


    However I also want to put in this newsbar scroller, but it is also controled by a var speed control

    var fontcolor="#FFFFFF";
    var splitcolor="#FFFFFF";
    var fontsize=11;
    var visitedlink="#ffffff";
    var rollovercolor="#FFFF00";
    var font="Arial";
    var speed=50;
    var sparte=4;
    var rubrik=13;
    var ticker_stop=1;
    var rollover_underline=0;
    var font_underline=0;
    var transparent=1;


    When both of these are in place they control each other - the newsbar I want to scroll at a speed of 3 while the Status bar message I want to go at 50. But when these are set both the status bar and the newsbar go at three. How can i make it so that these things are individual?? Thanks Heaps in advance.
    Btw the script extracts were not the full scripts.

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,079
    Thanks
    203
    Thanked 2,542 Times in 2,520 Posts
    It looks as though you have two global variables SPEED with the same name.
    Alter one of them to speed2 or something.

    <rant>
    Yet another "Thanks in advance" - why is it that people with only 1 post almost always use this gruesome expression? If you want people to devote time and effort to your problem you should offer thanks afterwards, not before. </rant>

  • #3
    New Coder
    Join Date
    May 2004
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I tried adding var speed1 but that didnt seem to help. Any other ideas?

  • #4
    Regular Coder
    Join Date
    Jul 2002
    Posts
    698
    Thanks
    0
    Thanked 0 Times in 0 Posts
    put each of ur scripts in seperate js files and then in 1 of them replace ALL occurences of speed with speed1.


  •  

    Posting Permissions

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