Thread: Dynamic Text
View Single Post
Old 12-02-2007, 13:49   #4 (permalink)
digitaloctane
Registered User
 
digitaloctane's Avatar
 
Join Date: Feb 2007
Location: Rhode Island
Posts: 24
This is copied directly from flash help.

this line: features_lv.load("safetyfeatures.txt"); Thats where you would reference your .txt file.

and: newFeatures_txt is the instance name of your dynamic text field.

Code:
// Load text as variable and assign it to the // dynamic text field var features_lv:LoadVars = new LoadVars(); features_lv.onLoad = onText; features_lv.load("safetyfeatures.txt"); function onText(success:Boolean) { if (success) { newFeatures_txt.text = features_lv.safetyfeatures; } else { newFeatures_txt.text = "unable to load text file."; } }
  Reply With Quote