Flash 4 - Loading Text Files - Ari Efendi

Advertisement

ads

Hot

Post Top Ad

Your Ad Spot

Saturday, January 1, 2011

Flash 4 - Loading Text Files

Sometimes it's a hassle to open and edit your .fla to make updates every time. Well this is a way to load external text (.txt) files into a location for quick updates.

Step 1

Create your text file in any text editor (such as Notepad). The only thing you must have is:

text=Then your text here

Step 2

If you want the text file to load upon the start of your movie, then create a layer, double click the first Keyframe and apply the following Actions:

Load Movie

In the right hand side of this window apply the following:

Load Variables Into Location
URL - Add the name of your text file, such as "text.txt", without the ". This is assuming all your files are in the same directory.
Location: Level=0

Should look like this:

Load Variables ("text.txt", 0)
If you want to load your text file through a button, then create your button, double click it and apply an OnMouseEvent, and apply the above commands in the button. Should look like this:

On (Release)
   Load Variables ("text.txt", 0)
End On


You can make your own choice for the OnMouseEvent, I prefer to use the Release method.

Step 3

Select the Text Tool, and select the Text Field button. Draw the location where you want the text file to load into.

Right click on the location and apply the following and only the following properties.

Variable:text
Multiline
Word Wrap
Disable Editing
Disable Selection

Note: When you upload, make sure you upload the text file into the same directory as your movie and HTML page. (Or whatever directory you specified in your Load Variable Action.)


Demikianlah artikel singkat ini dibuat semoga bermanfaat, jika ada kesalahan pada ide dan penulisan saya mohon maaf.
#Flash 4 - Loading Text Files #Cara Menbuat Loading Text Files #Tutorial Cara Menbuat Loading Text Files

No comments:

Post a Comment

Post Top Ad

Your Ad Spot