Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create Marquee names in flash but edit names in text file! HELP!!

Status
Not open for further replies.

killbuzz

Technical User
Mar 21, 2001
103
US
Hi all im trying something new with a website. I have looked around and havent been able to find a file or help sections on this. Maybe someone can help me on this...

The marquee is going to scroll left to right and repeat over and over. This is going to be in flash. What i need is the names that are going to be in the marquee needs to be in a text file so they can easily be edited by anyone that doesnt have flash knowlege.

Can this be done?
 
Why do it in Flash? You just try the simple marquee & /marquee tags in hmtl and use a little javascript to make it dynamic. It is as simple as that, Flash is overkill. Or if you insist on Flash then you could make a input text field, set a variable to that, create a dynamic text box, have the dynamic text box's text set to the variable and then make a motion tween with the dynamic text box going left to right. In the html, set the Flash object to "looping"
 
Why do it in Flash? You just try the simple marquee & /marquee tags in hmtl and use a little javascript to make it dynamic. It is as simple as that, Flash is overkill.
This is a Flash forum. It's purpose is to help people implement Flash solutions. Also the marquee tag only works correctly in IE, and is static in all other browsers. I would say the Flash plugin is a bit more universal.

killbuzz this is very easily done. Here is an example:

Create a text file called myVars.txt. The text file should be name/value pairs. So for example:

Code:
myMarquee=<b>This is my marquee!</b>

Create a new movie. Add a dynamic text box to frame 1 layer 1. Give the text box the instance name "myText".

Add a new layer and name it "Actions". On frame 1 add the following.

Code:
_root.myText.html = true;

myVars = new LoadVars();
myVars.onLoad = function(){
	_root.myText.htmlText = myVars.myMarquee;
}
myVars.load("myText.txt");

Save the text file and the Flash movie in the same directory and test or publish the movie.

You have now loaded an external text variable into Flash using the LoadVars object.

Here is a good tutorial for an actionscripted "typewriter" effect that you should be able to get to meet your needs.


Hope it helps!

Wow JT that almost looked like you knew what you were doing!
 
Thanks I did it but it doesnt do the marquee it just sets there doesnt scroll to the site this is what i have in my txt file

myMarquee=<b>This is my marquee!</b>

Do i need to put something else?
 
Yes you need to go through the tutorial at the link I provided and add that functionality to your movie. All my example does is show you how to get your variables into Flash. :)

Wow JT that almost looked like you knew what you were doing!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top