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
979 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:

  • videoke effects in flash (2)
  • karaoke in flash 8 (2)
  • how to make a videoke in flash (1)
  • tutorials on how to make karaoke in micromedia flash8 (1)
  • tutorial loading macromedia (1)
  • make karaoke text in micromedia (1)
  • macromedia flash videoke (1)
  • macromedia flash 8 videooke (1)
  • karaoke with flash8 actiion script (1)
  • karaoke lyrics flash tutorial (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 Safe Your Blog Dat

Indovps being hacked at 2008. I store my sharing-info.com site there. And the

Step by Step Creating Mp3

I often write about putting mp3 on your blog/website. From Step by step

Step by step how to put m

Yesterday, I update my REAL PERSUSI website. Its all about Indonesian Voice Actor

7 way to Increased Your A

Alexa is famous site thats provide about Traffic information on one site. Alexa