Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
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
Medium Priority
?
197 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 300 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

597 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