Flash : Updatable text fields
David Einhorn
Loading the Text File Variables
We have just defined the three variables for the
infos.txt file. Next, we have to load them into our movie. This is not difficult:
- Create a new layer in your timeline and call it "script".

This way, you will have a better overview of your project and can avoid any confusion between objects and scripts.
- Select the first frame in the timeline and right-click on it to call up its properties window.

- Select the Actions tab in the frame properties window.

- Click on the + button of this tab and select the Load/Unload Movie action.

- Select the Load variables into location option in the right-hand panel of the window.

- Enter the name of your file (here, infos.txt) in the URL field.

This step is to indicate the name of the file containing the variables and its location on the server. If you want to store
this file in a sub-directory called info, you have to enter info/infos.txt in this URL field.
- Enter 0 in the Level field.

This option is mainly used for loading external Flash animations. It defines the animation loading order. Thus, an animation
loaded with a 0 level will set the general options for your entire movie. This value is not important for our variables file.

Figure 4: Loading the variables from the infos.txt file
There you are. It is not yet visible, but the variables have been loaded into our movie. Now all we have to do is to assign
them to our three text fields.