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
Your Ad Here

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.

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: Ali Imran
Thank you for voting.
Rate this Materials:
Bad 
1 2 3 4 5 Excellent
print this page subscribe to newsletter subscribe to rss

Internet & computing Flash is a vector-based moving graphics format created by Macromedia for the publication of animations on the World Wide Web. More Flash & Swish: Most Popular Materials | Fresh Materials | More Flash Tutorials at FlashPerfection.com

Add comments to "Loading Dynamic Text from Text File"

Only registered users can write comment

No comments yet...