moving text on the screen with javascript

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Death Slaught
    Top Contributor
    • Aug 2007
    • 1137

    moving text on the screen with javascript

    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(r ichter,0)
    parent.moveBy(-richter,0)
    timer=setTimeou t("startEQ()",1 0)
    }
    function stopEQ()
    {
    clearTimeout(ti mer)
    }
    </script>
    </head>
    <body>

    <form>
    <input type="button" onclick="startE Q()" 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
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5388

    #2
    hi ...

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

    kind regards

    Comment

    • Death Slaught
      Top Contributor
      • Aug 2007
      • 1137

      #3
      Originally posted by gits
      hi ...

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

      kind regards
      Thanks

      - Death

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        Put the words in a span/div and change the top and left properties.

        Comment

        • Death Slaught
          Top Contributor
          • Aug 2007
          • 1137

          #5
          Originally posted by acoder
          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

          Comment

          • acoder
            Recognized Expert MVP
            • Nov 2006
            • 16032

            #6
            Originally posted by Death Slaught
            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.:
            [CODE=javascript]element.style.l eft = (parseInt(eleme nt.style.left) + 5) + "px";[/CODE]

            Comment

            Working...