Scrolling Problem

Okay, here is the issue :

I have a text field that loads in an external text file that will be changed daily. I also have two buttons (one for scrolling down and one for scrolling up) .. now all i am doing now is doing text.scroll + 1 to scroll down and - 1 to scroll up.

the problem is, that if you hold down the button, it does not keep scrolling, u have to push it multiple times.

how do i do a continous loop to keep it scrolling down (And not zoom down, with a nice speed to it)

If someone mentions the word "tween" i will have experts exchange give ME money from you!! :) this is NOT static text, it is read in from a file...

okay, i await your expertise...
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Q.10262516 for Messiah


I am not to familiar with using FLASH in a dynamic fashion as it appears you are doing but I think this will work.

1st)  I would make an "empty" movie clip that had nothing in it but frame actions. In the 1st frame of this movie, you would have an action that had a tell target statement that referenced your outer movie (the movie with the up & down buttons in it).  Inside that tell target statement you would have another action that said to "text.scroll + 1".  After that, end your tell target.  I would include samples, but I am not sure where you got the "text.scroll + 1" from.  I Assume it is moving your textbox up or down 1 pixel.  Regardless, if you can tell it to do that from the movie you are working with now, you should be able to tell it to do that from a "sub-movie" using the tell target statement.

Next add a number of frames equal to the amount of time you want it to "pause" before moving the text again.  In the last frame you would have a loop statement to loop the movie back to the beginning:
Go to and Play (1)

The reason you make it loop, is so that until it is explicitly told to stop it will repeat the action in the 1st frame, which creates  your scrolling effect w/o clicking.  You would make one movie like this for scrolling the text up and another for scrolling down.  That was the hard part. You could probably use one movie for both actions and pass it a variable or something to determine up or down, but that is more complicated.

2nd) Drag an instance of your empty "UP" & "DOWN" movies into the main movie with the up and down buttons.  Name the instances of those movies accordingly as "UPmovie" & "DOWNmovie" Now add an action to the "Up" button that says:

On (Press)
      Begin Tell Target ("UPmovie")
            Go to and Play (1)
      End Tell Target
End On

After that you should make add another action to the button that says:

On (Release, Drag Out, Release Outside)
      Begin Tell Target ("UPmovie")
      End Tell Target
End On

Do the same thing for the "DOWN" movie.

By doing this you have set the button to play a looping movie that moves your text up.  So the movie is going to continue playing (and moving your text) until you release the button or drag the mouse off the button.  This will leave you with a small but fixable problem.  If the person using the button is "stupid" they may hold it down for 10min!  This means with the previous code you have the text scrolling beyond the user's view.  To fix this, you can add a check before you move the text.  You can do an "If"statement that says if text.scroll is <= "Y" then move the text.  Where "Y" is some value that you pre-specify.  Possibly set "Y" equal to the "height" of the textbox?  You would do the just the opposite for the other direction: If text.scroll >= "Y".

Anyway, I hope this helps.  I used a similar solution to determine whether or not menus in a navigation bar were exteneded or not and if they were extended, then to close them.  If you wanna e-mail me:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Did you try this? Did it work for you?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.