By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,627 Members | 1,870 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,627 IT Pros & Developers. It's quick & easy.

moving text on the screen with javascript

Death Slaught
100+
P: 1,137
Here comes the headaches.


Ok I need to know how to do the following. (I think my brains gona fall out.....please don't just give me the answer but talk me through it so I can understand it.)



I need to know how to make text scroll across a limited amount of space across the screen.

I need to know how to put pauses(or reduce the speed) of/in the text.

Also I need to insert this into certain words.

[HTML]<html>
<head>
<script>
function startEQ()
{
richter=5
parent.moveBy(0,richter)
parent.moveBy(0,-richter)
parent.moveBy(richter,0)
parent.moveBy(-richter,0)
timer=setTimeout("startEQ()",10)
}
function stopEQ()
{
clearTimeout(timer)
}
</script>
</head>
<body>

<form>
<input type="button" onclick="startEQ()" value="Start an earthquake">
<br />
<br />
<input type="button" onclick="stopEQ()" value="Stop the earthquake">
</form>

</body>
</html>[/HTML]

but I want it to happen on certain words, and the user doesn't/can't click any thing.

I also need to know how to decorate the scrolling text, like change its color, make it glow.....etc.

And it needs to go from right to left.

And on certain words I need to know how to change the background's color/image.

--------------------------------------------------------------------------------------------------------------------

What I want this for is a music video, and the text scrolling below it is the lyrics.

Thanks, Death
Oct 11 '07 #1
Share this Question
Share on Google+
5 Replies


gits
Expert Mod 5K+
P: 5,390
hi ...

i splitted this post from the original thread since it concerns a very different topic ...

kind regards
Oct 12 '07 #2

Death Slaught
100+
P: 1,137
hi ...

i splitted this post from the original thread since it concerns a very different topic ...

kind regards
Thanks

- Death
Oct 12 '07 #3

acoder
Expert Mod 15k+
P: 16,027
Put the words in a span/div and change the top and left properties.
Oct 15 '07 #4

Death Slaught
100+
P: 1,137
Put the words in a span/div and change the top and left properties.
A: How do I change the top and left properties I googled it, and I get CSS.

B: how do I add the earthquake effect on certain words???

I don't want the answer, but can you atleast point me in the right direction. ( examples are always great lol).


Thanks, Death
Oct 15 '07 #5

acoder
Expert Mod 15k+
P: 16,027
A: How do I change the top and left properties I googled it, and I get CSS.
You would use the style property, e.g.:
Expand|Select|Wrap|Line Numbers
  1. element.style.left = (parseInt(element.style.left) + 5) + "px";
Oct 15 '07 #6

Post your reply

Sign in to post your reply or Sign up for a free account.