Ask a Question related to Macromedia Director Lingo, Design and Development.
-
Ueliisa Wenger webforumsuser@macromedia.com #1
read from a "text" file
Dear Everyone
I am a really beginner with Drirector. So I hope somewere can help me to have a better overwiew about start me projekt.
short dicription:
It should be like a "lexikon" you can choose in a list of words that you are searching or typ in a textfield and the list shows you "similar" Words and you can choose one. If you choosed you get more inforations to this word in different textfields and also you see a quicktime-movie to this word.
what I wish to do:
the nummer of the words, informations and the quicktime-movies can change: add, modify Informations, delete old ones (not in the Programm, but be the resarch-team) I want to read in the information, stored in text files (or database), from the file at runtime and link it (with a txtefile based list) to the video so that I can use one movie that change the quicktime and the text information if a user choose an other word in the list.
my question:
- I do not find any information how I can open and read from a textfile [or connect to a batabase] (and after that work with this data at "runtime")
Where I must looking for this functionality for filehandling?
Or is ther only the way of hardcoded links?
- Is it possible to save perferences/settings from a user so that he can use it by the next time?
where I can find this functions?
Dear ueliisa
Ueliisa Wenger webforumsuser@macromedia.com Guest
-
read XML file encoding="windows-1256"
hi i made a simple project reads XML file and it works good when the file is encoded with UTF-8 (the file contains arabic text) but flash can't... -
Is there a module that can check if user "foo" may read a file?
Hi i want to check a number of file against different user uid:s and see if they can read/write execute that file. I have searched on cpan but it... -
CS: "Could not read the file because there is not enough memory..." for placed PNG
I was just up(?)graded to Illustrator CS from 10. I opened a map that was created in AI10, which links to a PNG image used as a tracing template.... -
How can I "read" an .exe file in Linux?
Hi all, we have made a cd with a Director projector. It was done using Director MX. We would like to know if it is possible to make it work in... -
How to make the "search text" feature work with non "txt" file
On Fri, 27 Jun 2003 07:19:23 -0700, "Juergen" <anhorn@bktel.com> wrote: See MVP Doug Knox' comments and fix here:... -
lefrog webforumsuser@macromedia.com #2
Re:read from a "text" file
Hi there you can use fileIO to import txt file
My text file contains this text and is save in the same folder as your movie but you can save it anywhere as long as you specify a path:
4-Orion,Enterprise,Titan,Harland Applicator
on prepareMovie
gFileObj = script("file handlers").new(the moviePath)
gFileObj.mImportTxtFile("cdContent.txt")
end
this is "file handler" parent script:
property pImportedTxt -- text imported from the txtfile
property pFileObj -- fileIO object
property pCDContentFilePath -- filepath to the cd content file
-- create an instance of the fileIO object and store the relevent file paths
on new me, txtFilePath
pFileObj = new(xtra "FileIO")
pTxtFilePath = txtFilePath
return me
end
-- import the file passed and call the appropriate method
on mImportTxtFile me, fileNamePassed
pFileObj.openFile(pTxtFilePath & fileNamePassed, 1)
pImportedTxt = pFileObj.readfile()
pFileObj.closeFile()
-- call the method to sort
me.mSortContentFile()
end
on mSortContentFile me
the itemDelimiter = "-"
-- sort out number of products and save it in our variable store object
numOfProducts = pImportedTxt.item[1]
put numOfProducts -- i.e 4
--
namesOfProducts = pImportedTxt.item[2]
the itemDelimiter = ","
noOfItems = the number of items in namesOfProducts
productList = []
repeat with i = 1 to noOfItems
productList.add(namesOfProducts.item)
end repeat
put productList -- ie ["Orion", "Enterprise", "Titan", "Harland Applicator"]
end
hope this helps some
lefrog webforumsuser@macromedia.com Guest



Reply With Quote

