Our Flash tutorials provide you with step-by-step instructions on how to create beautiful Flash animations and integrate them into your website.  Home Flash & Swish Flash Tutorials Loading Dynamic Text from Text File

Loading Dynamic Text from Text File


You will have to load you data into a Dynamic text box. Lets get started.

Follow the steps.

1. Select Text Tool and draw a text box.

2. Make it Dynamic Text from the properties.

image 1
Click to enlarge

3. Now in Properties input a name in var input box, give name as data like this..

image 2
Click to enlarge

4. Write a text file in notepad and save it with name swish-db.txt.

5. Open text file and write the following code in it.

data=Ultimate Designers' Community

6. Now right click on first frame. Select Action now you will see the area where you will have to write the code.

7. In action you will have to write the following code.

loadVariables("swish-db.txt", this);

it will look like this.

Loading Dynamic Text from Text File
Click to enlarge

8. Now it will pick the text Ultimate Designers' Community and display in your movie.

9. That's all..

But if you want to display your text which is in your movie, then in target you will have to write the name of movie, like this

loadVariables("swish-db.txt", "_root.movieclipName");

Download example file here.

It will be more clear in the next tutorial, Loading dynamic data and making a scrollbar.

You can adjust the properties of your text box i.e. Single Line, Multiple Line etc.

I hope it helps..

Regards



Author's URL: Ali Imran
Final results of our readers
New!
Passed through all the steps? Share your result!
Your result will be premoderated.
Please make sure you choose the right image.
 
 



Captcha

*Required fileds
Our Flash tutorials provide you with step-by-step instructions on how to create beautiful Flash animations and integrate them into your website. More Flash Tutorials: Featured Materials | Fresh Materials | More Flash Tutorials at FlashPerfection.com

No comments yet...
Add comments to "Loading Dynamic Text from Text File"

Captcha