473,324 Members | 2,567 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

moving text on the screen with javascript

Death Slaught
1,137 1GB
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
5 2747
gits
5,390 Expert Mod 4TB
hi ...

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

kind regards
Oct 12 '07 #2
Death Slaught
1,137 1GB
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
16,027 Expert Mod 8TB
Put the words in a span/div and change the top and left properties.
Oct 15 '07 #4
Death Slaught
1,137 1GB
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
16,027 Expert Mod 8TB
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

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

Similar topics

2
by: upro | last post by:
Hi! I'm totally new to JavaScript, and haven't been able to find the answer to that on the web: I have an image and want to use an imagemap in a way that when the cursor touches a certain...
27
by: C Gillespie | last post by:
Dear All, Hopefully I have a simple problem. Basically, I just want to alter some text with JS. Here is some of my test code: <snip> <script type="text/javascript"> var tmp='a';
10
by: korund | last post by:
We can use special characters ('\n') to add line breaks in text in JavaScript popup Alert boxes. there is also few additional special characters: \' single quote \" double quote \&...
1
by: mmalloc | last post by:
I have the following code to move some text with javascript that works both on ie and ff. I can't make it XHTML compatble. If i remove the doctype info it will work. I'm sorry to bother with such...
1
by: bblondy66 | last post by:
i am creating a " Hello World" program. i need to make it loop and have it bounce from one side of the screen to another in command prompt. I have no idea how to do this.....i am so lost and my...
5
by: austincollins | last post by:
I have been searching for hours to find a solution to display text rotated at 90 degrees in firefox, and could not find one. css3 and IE has the css command "writing-mode: tb-rl;" but this does not...
3
by: mrrolf | last post by:
Hi all! I have some pictures on a page that I'm moving around with javascript. I'm just setting the style.top member. I don't want the image to overflow the parent container if I move it to a...
3
by: RuthC | last post by:
How to create a warped text using javascript? Is it possible..? pls help me ...
5
by: neogazz | last post by:
I am trying to a pass "text sentence" from a JavaScript function into my XHTML program is this possible?? 3134 Please see attached attached JavaScript coding. The reason why I am trying to...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.