Flash9:TextScrollBoxImport

Importing html formatted text into the scrolling text box
One down side of embedding text is that if the text is time changeable (temporal), such as an entrance fee into a theme park,

it would be better to store this in a file separate from the Movie.

Importing text into the text box:
So, an important consideration when including text into a multimedia presentation is the ability to keep the text up to date.

Text that includes dates is better imported from an external file allowing users to change the text without having to use Flash. In this section, you will create a txt file that contains HTML formatted text and get Flash to import it into its movie.

Using jnlText1.fla

1. Remove all the text in the scrolling text area you have created.

2. Using Notepad create and save jnlText_Scroll.txt varScrollBox= Scrolling Text Imported from a text file

In an HTML format

3. Now make the txt file all one line

varScrollBox= Scrolling Text Imported from a text file In an HTML format

What you will find is that Flash places its own  tags on each individual line, so when the html is kept to a single line it displays properly.

Back to Flash.



4. With the Scroll box selected Click on the Render text as html button.

5. In the Var field enter varScrollBox, it must exactly match the variable created in the txt file. (e.g. varscrollbox is not the same as varScrollBox)

Adding the preloader
Now for the clever bit. We are going to put some pre-loader code into frame 1 of the Actions layer to load up the scrolling

text box.

1. Click on Frame 1 of the Actions layer and add this ActionScript. ( found in [F9] ActionScript 1.0 & 2.0 > Global Functions > Browser/Network).

loadVariablesNum("jnlText_Scroll.txt",0);



2. Now test the movie.([Ctrl]+[Enter]



Trouble shooting
If you have problems check

1. The file jnlText_Scroll.txt exists and is in the same folder as the fla file

2. The txt file contains the text and is saved.

3. The variable name in the text file is exactly the same as in the var box for the scrolling text area. This means the upper and lowercase match e.g. varscrollbox is not the same as varScrollBox

4. Check that all the text is on one line.

5. If the Scroll box is greyed out, have you inserted the pre-loader frames? The File needs to be loaded THEN displayed on the screen.

Task : Update the Journal files
1.	Add an external Scroll Box to all of the other jnl Files