1. Home
  2. Computing & Technology
  3. Animation

Flash Animation 27: Flash for Web Design: Creating Scrollable Text

By , About.com Guide

7 of 10

Scroll Command II

The first parameter we need to add is the instance name of what will be scrolling, so the scroll command knows what to act on. Like all other parameters, it goes before the command, separated by a period.

Next we need to define the increments. We have to use operators for that; using the = sign would set the value of the scroll position to whatever we placed after it, but we don't want to do that. Instead we want to take the current position--no matter what it might happen to be--and, since we're working on the "up" button, lower that position's value by one. So we add a - sign in front of the =, and a 1 after, effectively translating into, "when we click on the up button, the content of the text box named "scrollbox" will scroll up by a single increment from its current position".

I know it seems a little confusing, but after you work with it for a while you get used to it. You can edit the code to add the appropriate variables/conditions in the Expressions text box, so it should look similar to this:

on (release) {
scrollbox.scroll -=1;
}

Explore Animation
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Animation
  4. Flash Animation Tutorials
  5. Flash Animation 27: Flash for Web Design: Creating Scrollable Text

©2009 About.com, a part of The New York Times Company.

All rights reserved.