First time here? First time here? Newsletter Signup Newsletter
Search tutorials
Author: Patrick Mineault

Setting things up

Okay, first of all you'll need to make two buttons: up and down. They can be of any shape you want. You may want to give the buttons a big hit area so that the user can be slightly off the button and still be able to scroll.

Next you'll need to make a textbox. Just click on the text tool and let your inspiration carry you. You can let the text overflow, we'll fix this later.

Now select the text and go into the « Text Options » panel. Set the options as in this screenshot:

If you can't seem to find the panel, it's in Window > Panels > Text options. Here's what each of the options do:

  1. We choose dynamic text, since it is the only kind of textbox where you can alter the scroll property in actionscript. There's a nice side effect to using dynamic text: unless you choose to embed your fonts, the text will not be anti-aliased, so it will look good even at small sizes.

  2. Choosing Multiline will allow the text to spread across multiple lines.

  3. We set the variable name to "daTextBox" here. We'll use this name later to refer to the textbox in ActionScript.

  4. By choosing HTML, we can apply basic formatting on the text ( color, size, bold, italics, and hyperlinks )

  5. Word wrap works in conjunction with multiline to allow the text to wrap.

There is something peculiar in the way Flash handles text boxes and scrolling: you can't scroll a text box unless you fill its contents using ActionScript. In order to do this, you can load external text files into Flash, but that's much beyond the scope of this tutorial. Right now, we're just going to place the contents of the text box directly in Actionscript (a technique called «hard-coding» ).

There's an easy way to transfer the text ( or rather, the underlying HTML ) from the text box to ActionScript. When you test your movie (Ctrl+enter), you can see a list of the variables in the movie by going to the Debug menu and choosing « List Variables ». You should see something similar to this:

As you can see, the HTML content of the text box is accessible (it's on the second-to-last line, in this case). Select all of the HTML, copy it, and then paste it into Notepad or a similar program. Save this for later use.

Once this is done, you can go back to your Flash movie, and safely delete the contents of the text box. You should reduce its height as well, otherwise there won't be a need for scrolling.

Finally, place your text box and your two buttons on the main timeline, select everything, and press F8 to convert to a movie clip. Name it «containerMC» . Our setup is now done.

» Level Basic

Added: 2001-06-20
Rating: 8 Votes: 400
(10 being the highest)
» Author
No details available.
» Download
Download the files used in this tutorial.
» Forums
More help? Search our boards for quick answers!


  • There are no comments yet. Be the first to comment!

  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.
Featured Flash FLA
» Author: Inocreato
» Title: RaiseTheBlocks
» Description: Raise all the blocks to win the game
Featured Sound Loops
Image for equalize

Audio Player

» Author: TomCat Carty
» Title: The Wood
» Description: Just a little game ending or it can maybe be looped. Recorders with music box and percussion to give the feel of well, I don't know, the woods? Free to use, just credit me. thank you
Latest Font
» Author: Fábio FAFERS
» Description: I created this font for free use. Everyone can apply it in personal or business texts. Its free, but I want to be communicated in case of business use. Donations are accepted to keep the project of free fonts alive! Thank you all
Featured Sound Fx
Image for equalize

Audio Player

» Author: Davisigner
» Description: Hmm... what to say about this one? It's reminiscent of the closing notes of the opening music from the Three Stooges done in a church organ style with a closing cymbal crash. I'll give this one away gratis, but feel free to check out my free loops and potential upcoming license-mandated ones over in the respective part of Flashkit.