473,471 Members | 1,977 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

moving text on the screen with javascript

Death Slaught
1,137 Top Contributor
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 2756
gits
5,390 Recognized Expert Moderator Expert
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 Top Contributor
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 Recognized Expert Moderator MVP
Put the words in a span/div and change the top and left properties.
Oct 15 '07 #4
Death Slaught
1,137 Top Contributor
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 Recognized Expert Moderator MVP
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.