View ActionScript for the dynamic text field

You can view the ActionScript that loads text from the external text file into the dynamic text field. This script uses LoadVars actions to load the safetyfeatures.txt content in the newFeatures text field.

  1. In the Timeline, select Frame 1 of the Actions layer.
  2. Select Window > Development Panels > Actions, or press F9.

    The ActionScript appears as follows:

    // Load text as variable and assign it to dynamic text field
    Features_lv = new LoadVars();
    Features_lv.onLoad = onText;
    Features_lv.load("safetyfeatures.txt");
    function onText() {
    
    
      newFeatures_txt.text = Features_lv.safetyFeatures;
    
    }
  3. Close the Actions panel.