Written by: Khawar Shehzad
Difficulty Level: beginner Download FLA

Dear Flashers!

Today I am going to tell you how to make the easiest of all scrolling. This kind of scrolling is best for those designers who do not want to delve into the cumbersome programming of ActionScript . This phenomenon is basically a technique.

Now open the blank Flash document and follow the instructions given below.

1: Save the document with the name ? easy_scrolling.fla ?.

2: On the first frame of the layer 1 make a big static text box in which you can place your whole text. Now place the text into it. And name the first layer ?text?.

Your first look can be like this

Now we have to mask this text. Follow the steps below

1: Apply a new layer and name it ?box?. Make this layer above the ?text? layer.

2: Now make a rectangle (with the help of rectangle tool from the ToolBox ) on the text you want to show when the page first loads.

Scrolling will occur on the rest of the text.

3 :Now right click on the box layer and apply the ?mask?.

Your second look can be like this

Now we are done with the first part of our ?something-like-scrolling?.

Now make another layer on top of all layers and call it ?buttons?. On this layer we will place the buttons which will trigger the scrolling ..

Before doing all the new stuff you should first make the ?text box? a movie clip. Unlock the ?text? layer, select the ?text box?, press F8 on keyboard and select the ? MovieClip ? radio button, name the movieClip as ? scrollableText ? and press OK. Now your text box is a movieClip . Now in the properties window of the above-mentioned MovieClip , name it ? scrollable_text ? in the ?instance name? field. Now again lock the ?text? layer.

Now come back to the ?buttons? layer. Place two buttons on the stage. One for scroll-up and the second for scroll-down as shown below.

Now place the follow code on the button which is above

on( press, release, keyPress "")
        scrollable_text._y += 30;

And place the following code on the button which is at the bottom

on( press, release, keyPress "")
        scrollable_text._y -= 30;

Now we are done. Press Ctrl+Enter to make flash to obey the rules and see the movie. I think its working. Let the discrepancies be the ?latest fashion?.

Now let us see what the code means.

1: on( release,press,keyPress ?<Up>?) is the event handler which means that when the user presses the mouse button or releases the mouse button or presses the ?Up? key on the keyboard the code in the braces should execute i.e.

scrollable_text._y +=30;

This code will make the movieClip's (named ? scrollable_text ?) y-position 30 pixels down.

2: Now the code for second button is the same except that the keyboard press is ?down? key and the movieClip movement is Upward because of this

scrollable_text_y -= 30;