Flash & Swish  Home Flash & Swish Flash Tutorials Calling Frames in Dynamic Movie
rss

Calling Frames in Dynamic Movie

Author: Selteco.com More by this author


This tutorial was written for the Flash Designer software, which allows you to create flash animations in a much easier way than by using Macromedia Flash. You may get Flash Designer here.

The text will scroll when you move the mouse over the arrows.

Follow the steps below:

1. Launch Flash Designer and create a blank document.

2. Set the frame delay to "Stop" ("Frame" > "Frame Delay").

3. Size the frame at about 300x200 ("Frame" > "Frame Size").

4.Create a new dynamic text paragraph and enter a very long text with many line breaks.

image 1

5. Choose "Item" > "Placement Properties" and make sure the item name is "HTMLText1". Rename it if necessary. Click OK.

6. Choose "Frame" > "Insert from Gallery", select "Down" and click OK to insert down button. Repeat the same an insert "Up" button.

image 2

7. Position both triangles at the right

image 3

Next define ActionScript code:

1. Choose Frame > ActionScript and enter:

function scrl()
{
HTMLText1.scroll=HTMLText1.scroll+scrolldelta;
}
setinterval(scrl,100);
//setinterval runs the "scrl" function every 100 milliseconds
//scrl function adjusts txt.scroll by the value of "scrolldelta"
//the variable "scrolldelta" will be 1,-1, or 0

2. Select up arrow, choose "Item" > "Actions" > "OnOver" and enter the following ActionScript code:

scrolldelta=-1;

3. Choose "Item" > "Actions" > "OnOut" and enter the following ActionScript code:

scrolldelta=0;

4. Select down arrow, choose "Item" > "Actions" > "OnOver" and enter the following ActionScript code:

scrolldelta=1;

5. Choose "Item" > "Actions" > "OnOut" and enter the following ActionScript code:

scrolldelta=0;

Hit F9 to play the file.

OnOver and OnOut actions are executed on mouse events. scrl function executes every 50 miliseconds. To speed up scrolling decrease the delay to 30 or less miliseconds.

Download source project t1037.zip



Rate this Material: Bad 1 2 3 4 5 Excellent
print this page tell a friend subscribe to newsletter subscribe to rss

Add comments to "Calling Frames in Dynamic Movie"