Our Flash tutorials provide you with step-by-step instructions on how to create beautiful Flash animations and integrate them into your website.  Home Flash & Swish Flash Tutorials Scrolling Text [ flash 5 ]
Your Ad Here

Scrolling Text [ flash 5 ]


Often asked is this "How to I make scrolling text in Flash?", and well there are a number of ways. However the easiest is using the built in scroll and maxscroll properties. Every text field automaticaly has these properties, and when can use simple commands in flash to controll them.

Open up flash and add a text field to the stage. Select INPUT as the text type, and give it a variable name scrollTEXT. Now resize the text box to cover the area that you want it to be. (Note: if your using a non-standard font you may want to Embede the Font Set). I have decided to use Arial as it is available on 99% of all computers.

Note: don't forget to change single line to MultiLine.

image 1

Next

Select the first frame in the main timeline, and open up the Actions window. Here we want to add the text that goes in our text box. So you want to tell flash Variable scrollTEXT is equal to I want to bake a cake (or your appropiate text).

You will notice that in my line of text I have rn and you maybe wondering what these are.

When you require a line break use the r command (similar to in HTML) and if you want a new line use the n command.

If you want you can put this command on a button rather than on a frame. The text will not appear in the box until the variable is set. You can also change the text, thereby allowing you to have multiple articles, writings and such like apearing in the one box, and the scroll buttons will still work.

image 2

Right

Now we have the text in our box, lets make it scroll. First of all you'll need 2 buttons, one for up and one for down. I'm just using the default buttons that come with flash. Next we need some action script to drive the buttons. On the down button enter the following code.

image 3

For the top button enter the same code BUT change the +1 to -1. Test your movie, and it should work fine. If it doesn't just check your spelling, variable names and such like. I know for myself when I have the same name in 5 places I'm bound to spell one of them wrong.

Note: with Flash MX it is a lot easier to create scrolling text. Position a multiline text box on the stage, and give it an INSTANCE name. Next open up the components area, and find the Flash components that come with Flash MX. Inside you will see a Scroll Bar component, simply drag and drop this onto your text box. Add some text and test.



Author's URL: Mr K
Thank you for voting.
Rate this Materials:
Bad 
1 2 3 4 5 Excellent
print this page subscribe to newsletter subscribe to rss

Internet & computing Flash is a vector-based moving graphics format created by Macromedia for the publication of animations on the World Wide Web. More Flash & Swish: Most Popular Materials | Fresh Materials | More Flash Tutorials at FlashPerfection.com

Add comments to "Scrolling Text [ flash 5 ]"

Only registered users can write comment

No comments yet...