Automatic vertical text scroller

I’m new to flash and got stuck trying to design an automatic vertical text scroller.

Here is what I set out to do:

  • Have a news ticker like box through which text will be vertically scrolling.
  • The textual content will come from an external text file.
  • The text in the external file will also have click-able html links.
  • When the mouse enters the content area, the scrolling would stop.
  • If any link is visible in the content area at that time, the user will be able to click on it.
  • When the mouse leaves the content area, the scrolling would continue.

Basically, it’s an html marquee which you see in so many pages these days.

The following was my approach to solving the problem. Got very close and then got stuck :frowning:

  • I created a Dynamic Textbox and have it load from the external file. The dynamic textbox has multiline and autoSize set to true. So the size of it grows depending on the content from the external file.
  • Next, converted the “textbox with external loading” into a movie clip and named it content_mc.
  • Created a rounded rectangle (my viewing area) and converted that to a movie clip called mask_mc.
  • On the stage, the content_mc is in one layer (content) and the mask_mc is in another layer (mask).
  • Added another layer (action) and on the first frame of the main timeline, I entered the Action Script to set the mask_mc as the mask for content_mc.
  • Also in this AS, I align the content_mc top with the mask_mc top so that the content is visible at the start.
  • Then in the content layer, I inserted a movie clip “controller”. This clip has two frames and all it does is it moves the _root.content_mc up by a fixed unit until the bottom of content_mc is over the mask_mc top. At that point, it sets the top of the content_mc back to the top of mask_mc.

Since I have little to no flash training, you can understand my excitement when the above steps worked and I got a fairly smooth scrolling text fitted in my viwing window. I could also click on all the links in my text. Yayyy!

Then I took on the task of making the scroll stop and resume on mouse enter and leave event. What I did was:

  • In the action script on the action layer, I simply defined two content_mc.onRollOver and content_mc.onRollOut functions. In the first I stop the controller movie clip and in the second, I play the controller movie clip.

The above strategy also worked as I wanted but it created a new problem! Whenever the mouse enters the mask area, the mouse pointer turns into a clicking hand cursor (the one you use to click on links); and it doesn’t allow me to click on any of the html links anymore! It’s almost as if the content_mc movie clip has turned into a button!

Regardless to say, this is unacceptable in my case if I cannot click on the html links in the original text content. I have googled quite a bit and must admit that I haven’t had much luck (why else would I be posting here and other places?). I desperately need someone’s assistance with solving this. Some of the approaches I have seen on google wouldn’t work for me. For example, having invisible buttons for the html links. Of course that wouldn’t work since my text is coming from an external text file over which I have no control.

Any guidance in the right direction will be much appreciated. And of course, I have almost no time left to solve this. But since what I am trying to achieve is something so simple, I’m assuming the solution would not take prohibitively long.

Thanks in advance to all the nice and helpful people who will be pouring in with their suggestions.