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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic text reload problem

Status
Not open for further replies.

tmckeown

IS-IT--Management
Nov 15, 2002
448
US
I have a Flash Slide Presentation that pulls in a lot of dynamic text from external text files. I publish it as a projector.exe file. It runs on a display 24/7 in a few buildings. It has scheduling information for the company I work for.

I need to update this text very often. I'm running into one of two problems.
1) If I set the text to reload (making a loop) each time it gets to a slide, I can not edit and save the text. I get an error in Notepad "Cannot create the C:\xxx.txt file. Make sure the path and filename are correct. Of course, the file exists. I think the cause of the error is that two applications can't be working on the same file at the same time. Both Flash and Notepad want to have control of it.

2) If I take out the loop, then I can edit and save the text file, but I have to stop and restart Flash for it to pull in the new text.

Any ideas on how to avoid one of the two problems? I simply want the Flash presentation to always be running and it pulls in the text each time I modify it. Maybe there is a way to check the time/date on the file and only load it if it has been changed? I'm not sure that will cure the problem of writing to an already open file.

thanks,
 
Oh, I forgot. Here is the code I'm using to pull in the text. It appears in the first frame.

var data_loader:LoadVars = new LoadVars();
data_loader.onData = function (src:String):Void {
Quote_txt.text = src;
}
data_loader.load("Quote.txt");
 
I got it.
I added an interval to the load function. Now it updates the dynamic text once every few minutes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top