Home » Design Tutorial » Adobe Flash » How to Load Text from File in Macromedia Flash Tutorial

How to Load Text from File in Macromedia Flash Tutorial

Thursday, March 11th, 2010 | Adobe Flash, Design Tutorial
773 views

This time I will try to give how to load text from file in Flash tutorial. In next post I will explain how to load HTML type text.

I’m still using Macromedia Flash 8.

Fla and Txt File for download :

Download Example Load Text from file at Flash by Shireishou

Click picture to enlarge

1. Use Text Tool (A) and make huge box like this. And set the property like :
a. Instance name : ins
b. Type text : Dynamic and set it at Multiline
c. Var : name

(see picture for brief example)

2. Create notepad file. Name it with fanfic.txt. Write at first line name=BLABLA. Make sure name=BLA is WITHOUT space. You just need to press enter if you want to make enter. Double enter will caused 2 space.



3. Back to flash and create new layer (press button in red square)

4. In frame 1, press F9(action script) and type

stop();
loadVarsText = new LoadVars();
loadVarsText.load("fanfic.txt");
loadVarsText.onLoad = function (success) {
if(success){
ins.text = this.name;
}
textBox.text = this.name;}

I will explain it latter

5. Windows->Components (ctrl+F7)

6. Choose UIScrollBar

7. Drag it into the right side on the box for put the scroll bar

8. Done

Action Script explanation

stop();

This function for stopping flash moving to next frame

loadVarsText = new LoadVars();

to declare new loadVars and named as loadVarsText

loadVarsText.load(“fanfic.txt”);

Load file fanfic.txt

loadVarsText.onLoad = function (success) {

if(success){
ins.text = this.name;
}
textBox.text = this.name;

}

If the file able to loaded, then what we wrote after word “name” will put at dynamic text ins.

Hope it clear enough. If you have any question pls feel free to ask.

Related Posts Plugin for WordPress, Blogger...

Incoming search terms:

  • tutorial action load text flash 8 (2)
  • tutorial action loadtext flash 8 (2)
  • flash 8 tutorial load text (1)
  • load text file into flash8 (1)
  • load text macromedia flash 8 (1)
  • load txt files in macromedia flash 8 (1)
  • macromedia flash load text (1)
  • timeline loadtext (1)
  • videoke in flash tutorials (1)

Tags: , , , , , , , ,

Related How to Load Text from File in Macromedia Flash Tutorial

RSS feed | Trackback URI

Comments »

No comments yet.

Name (required)
E-mail (required - never shown publicly)
URI
Subscribe to comments via email
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment.

How to Using Paypal for B

I got request from my Deviant Account. They asked me to create How

Best free SFX download si

Best free SFX download site I often make fandub (Dubbing foreign people into

Tutorial Creating faveico

There are a lot of faveicon generator on internet. Actually, if you read

Karaoke Effect with Aegis

I asking about Karaoke tutorial with aegisub few month ago and after that