View Full Version : Var Speed controls

05-02-2004, 10:39 AM
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.

Philip M
05-02-2004, 10:52 AM
It looks as though you have two global variables SPEED with the same name.
Alter one of them to speed2 or something.

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>

05-02-2004, 11:24 AM
I tried adding var speed1 but that didnt seem to help. Any other ideas?

05-02-2004, 12:18 PM
put each of ur scripts in seperate js files and then in 1 of them replace ALL occurences of speed with speed1.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum