First time here? First time here? Newsletter Signup Newsletter
651326 Members and growing! | Flash Jobs
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!

Comments

  • 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: doc_chin7
» Description:

The flash's horizontal road drive was done in CS4 and was upgraded to CS6. The car responds to right/ left key and flash will auto-generate the movement of roads from left-right or right-left based on random number. Have fun driving in this virtual environment and avoid other cars... :) If you are creative, a road driving game can be created from it.

Featured Sound Loops
Image for equalize

Audio Player

» Author: BoxCat
» Title: CPU Talk
» Description: From the cyberpunk RPG, "Nameless: the Hackers" Completely Free to use! Keywords: edm hip hop rap electronic mysterious mission hacking chase exciting spy ios ambient chilling love happy sad angry suspense
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: nathan
» Description:

A recorded sound of the Dimensional Fork Gate.