2 Replies Latest reply on Nov 7, 2006 5:25 AM by Newsgroup_User

    Scroll text slowly

    Level 7
      Hello:
      I need to scroll text slowly. How can I do it slowly?

      on mousedown me
      repeat while the mousedown
      member("Mytext").scrollByLine(1)
      end repeat
      end

      thank you


        • 1. Re: Scroll text slowly
          Level 7
          "scrollTop" is a per pixel property.

          hth


          --
          -----
          Ned
          ------------------------------------
          Bien faire et laisser braire ...
          mais après avoir lu & compris ceci :
          http://faqmm.free.fr
          ------------------------------------
          • 2. Re: Scroll text slowly
            Level 7
            Hi Anne,

            As you've found, you don't want to scroll text in a repeat loop. Repeat
            loops will run as fast as possible and lock out any other operation in
            the movie.

            One of the most reliable methods for scrolling text is to use the frame
            rate as your speed control.

            If you want to continue to scroll by line, then something like this
            might work for you:

            --------
            property thisSprite -- the control sprite
            property textSprite -- the sprite that holds the text to scroll
            property animateMe -- a boolean to control the scroll

            on getPropertyDescriptionList
            myPropList = [:]
            myPropList.addProp(#textSprite,[#comment:"enter the text sprite
            channel number:",#format:#integer,#default:""])
            return myPropList
            end

            on beginSprite me
            thisSprite = me.spriteNum
            sprite(textSprite).member.scrollTop = 0
            animateMe = false
            end

            on mouseDown me
            animateMe = true
            end

            on mouseUp me
            animateMe = false
            end

            on exitFrame me
            if animateMe then
            sprite(textSprite).member.scrollByLine(1)
            end if
            end
            -------------

            This will scroll the text as long as the control is clicked on. You
            probably want to add a condition that will stop the scrolling when
            you've reached the end of the block of text.

            --
            Rob
            _______
            Rob Dillon
            Adobe Community Expert
            http://www.ddg-designs.com
            412-243-9119

            http://www.macromedia.com/software/trial/