Introduction to Flash MX Tutorial > Load dynamic text at runtime > Use the loadVariables action to load text |
![]() ![]() ![]() |
Use the loadVariables action to load text
The loadVariables
action includes a parameter to specify the path to the variable text. The text is in a file named copy.txt, within your Tutorials/FlashIntro/Assets folder.
1 |
In the Timeline, add a new layer and name it Actions. If necessary, drag the Actions layer to the top of the Timeline. |
A good practice is to keep actions on the top layer in a Timeline. |
|
2 |
If the Actions panel is not open, choose Window > Actions. Enlarge the Actions panel, if necessary, by clicking the white arrow in the title bar to expand the window, and by dragging the lower right corner of the panel to view the Actions toolbox and Script pane. |
The type of Actions panel that is displayed depends on the object to which you're adding an action. If you've selected a frame, for example, the Actions panel displays actions for frames. If you've selected a button, the Actions panel displays actions for buttons. |
|
3 |
Click the triangle in the upper right corner of the panel title bar to display the pop-up menu. Verify that normal mode, rather than expert mode, is selected. |
Expert mode offers features useful to those experienced with ActionScript. In normal mode, parameter fields and controls guide you in creating ActionScript. |
|
4 |
In the Actions toolbox, choose Actions > Browser/Network, then double-click |
The ActionScript is added to the Script pane. Parameters for the action appear above the Script pane. |
|
5 |
In the URL text box, type the path to the text file: ../assets/copy.txt. |
![]() ![]() ![]() |