This is not perfect, but I hope it will give you some ideas. In my solution you don't drag but only move the mouse left or right over the marquee. Speed and direction are detected and the marquee is adjusted to reflect left and right scrolling and also the speed to some extent.
You'll probably have to play around with the calculation of the delay and the speed.
Here's the sample:
<html>
<body>
X <input id="X" style="width: 2em;"/> Y <input id="Y" style="width: 2em;"/></br>
<div style="width: 4em; float:left;">Direction</div><input id="direction" style="width: 2em;"/></br>
<div style="width: 4em; float:left;">Speed</div><input id="speed" style="width: 2em;" value=""/></br>
<div style="width: 4em; float:left;">Delay</div><input id="delay" style="width: 2em;" value=""/></br>
<marquee id="myMarquee"
direction="left"
behavior="scroll"
scrollamount="2"
scrolldelay="100"
onmouseover="mouseOver(this);"
onmouseout="mouseOut(this);"
onmousemove="mouseMove(this);"
style="height: 4em; border: 2px solid red; background-color: #DDDD55; align: middle;">
<span style="font-size: 2.0em;">This text will be scrolled left or right depending on the direction you move the mouse. Enjoy!</span>
</marquee>
<script type="text/javascript">
var mx;
var my;
var direction;
var speed;
function mouseOver(me)
{
me.stop();
var e = window.event;
mx = e.clientX;
my = e.clientY;
}
function mouseOut(me)
{
me.start();
mx = -1;
my = -1;
}
function mouseMove(me)
{
var e = window.event;
var x = e.clientX;
var y = e.clientY;
if(isNaN(mx) || isNaN(my))
{
mx = x; my = y;
return;
}
var delta = x-mx;
direction = (delta)>0 ? 1:-1;
speed = delta<0 ? -delta : delta;
mx = x; my = y;
var sxEle = document.getElementById("X");
var syEle = document.getElementById("Y");
var directionEle = document.getElementById("direction");
var speedEle = document.getElementById("speed");
var delayEle = document.getElementById("delay");
sxEle.value=mx;
syEle.value=my;
directionEle.value=direction;
me.direction = direction>0 ? "right" : "left";
me.scrollAmount = speed;
var mqDelay = 100 - speed*10*4;
mqDelay = mqDelay<0 ? 1 : mqDelay;
me.scrollDelay = mqDelay;
speedEle.value = speed;
delayEle.value = mqDelay;
me.start();
}
</script>
</body>
</html>
Regards,