Flash & Swish  Home Flash & Swish Flash Tutorials Loading Dynamic Text from Text File
rss

Loading Dynamic Text from Text File

Author: Ali Imran More by this author


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.

Click to enlarge
Click to enlarge

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

Click to enlarge
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.

Click to enlarge
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: www.swish-db.com

Rate this Material: Bad 1 2 3 4 5 Excellent
print this page tell a friend subscribe to newsletter subscribe to rss

Add comments to "Loading Dynamic Text from Text File"