This content has been marked as final. Show 5 replies
I dont get what you're writing.
Director reads a txt file, pulls the bits, then upon importing the file again even though the txt values have changed Director reads the 'old' values ?
I use alot of txt file parsing and haven't seen this issue. I use Fileio so I will assume you have as well, try clearing your fileIO object. I know buddyapi keeps track of some paths but wouldnt imagin it would be keeping the info of a file.
Gut feeling is you are not clearing an object, global or some other reference to the .txt file.
Try popping up a 'open' window with Fileio and manually choose your file to see if this makes any difference!
Sorry for the confusion - maybe I'm not even doing this the right way:
I have a file called "indent.txt" located in an Assets folder subbed from the projector (and .dir workfile). I am not using FileIO - maybe that's my problem. The ident file reads as such:
global identity, location
set identity = "Some Company Name"
set location = " http://www.somelink.com"
I have this linked externally - as a script. When the movie starts, it extracts these global values and assigns them to text cast members to present on the stage (like "Welcome to Some Company Name" - then links to a website). When I run the .dir workfile, regardless of what the ident.txt file is set to it always refreshes/updates. When I commit this to a projector, it will take in the values as noted in the indent.txt file the FIRST time, then it seems to store those values and regardless of whether we update the ident file remains the same data as the "first run".
The bottom line is that we are trying to make a shell projector that we can just change the ident file for each client and avoid the time to make new projectors for each client.
Thanks in advance.
Okay I may have cracked this one with your previous kind advice. I split out the values to two files: ident.txt and loc.txt - using FileIO I am opening the files, assigning the strings to values and assigning those values to text fields to present on stage. I have yet to make the projector but it appears I'm at least on the right track.
Hers an excert from one of my projects that relies on a txt file:
fileObj = new(xtra "FileIO")
openFile(fileObj, (the moviePath&"SomeFile.txt"), 1) -- open the file at a given location
text = readfile(fileObj) -- read the file, text now in memory!!
--DO SOMETHING INTERSETING WITH THE RESULT
-- DO SOME MORE ERROR CHECKING OR WHATEVER
closeFile(fileObj) --IMPORTANT ALWAYS CLOSE FILEio
That's pretty much what I did and it worked. Thanks.