Solved

When using a .txt file to update text within a movie - Can you do specific things with that text?

Posted on 2001-06-22
3
164 Views
Last Modified: 2010-04-03
Topic says all really ;)

When I use tell flash to get the varibles from an external .txt file, it will grab the text I put in the text file. However...is there a way to do certain things with that text?

Is there a way to insert links, change font, color, for that text? Can you tell an image to load within that text box along with the text?

If anyone could list all the little tricks you can do with using a external text file to update text within flash, please do so :)
0
Comment
Question by:Vikarou
3 Comments
 
LVL 1

Expert Comment

by:Dr_Snipple
ID: 6221964
you can't load an image but you can insert links.
You have to use the ahref Tag in your .txt file.

Dr_Snipple
0
 
LVL 6

Expert Comment

by:Jaymol
ID: 6223569
As long as the text field is a HTML type.

John.
0
 
LVL 3

Accepted Solution

by:
jeffbeasley earned 75 total points
ID: 6224748
Actually there are a few ways to load external images using a text file.

First import your images into separate Fla files (with size equal to picture size) then export the swf.(by saving your images this way you are able to choose which images to import)

Next, create a text file with your variable
my_images=pic1.swf,pic2.swf,pic3.swf

Next open main FLA and load text file in frame 1
loadVariables ("text.txt", my_images);

Next put functions in frame 1

function string_clean(symbol, stringin) {
var arrayout = new Array();
n = 1;
for (i=0; i<stringin.length; i++) {
if (stringin.charAt(i) != symbol) {
arrayout[n] = arrayout[n]+stringin.charAt(i);
} else if (stringin.charAt(i) == symbol) {
n++;
}
}
return (arrayout);
}


Next call function to separate image swf files into array element (send function separating element and variable loaded)
image_array=new Array();
image_array=string_clean(",",my_images);
//this sets image_array[0]=pic1.swf;
//image_array[1]=pic2.swf .....


Next, determine where you want your images. Create a MC with instance named movie_target and in frame 3 call
loadMovieNum (image_array[1], movie_target);

This is one possible way if you need cleaner code let me know or a sample file, You can also load certain HTML text files with limited HTML commands, but you cannot load an external image saved as a gif or jpeg.

I typed this out in the comment space allotted, so there may be a few syntax errors
Jeff
jeffbeasley.com
straxis.com

0

Featured Post

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to create a simple "throw object" gesture on as3 / air mobile ? 3 1,183
Flash media server 1 332
How do I convert a CS4 FLA file to CS6? 1 871
Action Script commands 4 314
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question