This content has been marked as final. Show 12 replies
The only thing I can think of would be to load the text and then pull apart that text file into multiple arrays. Then you could set the text of the textfield to an array element and increment it the same way.
So the answer is no, not with Flash itself.
You could have some kind of server side database that would provide only the parts of text you need in response to a query.
If you need to pull things apart or use just parts you might want to look into the XML class.
In general, text loading is pretty quick. If the text is so big that you don't want to load all of it, you should rethink whatever strategy you are contemplating.
I'm trying to create a glossary, when the user clicks on a certain word, the definition is loaded from a text file that contains all the definitions.
>>...when the user clicks on a certain word, the definition is loaded from a
>>text file that contains all the definitions.
This would be much better handled by using a database vs a simple text file.
Adobe Community Expert
Is there a sample file or documentation showing how Flash interacts with a database ?
Or better yet, any examples of glossaries built with Flash ?
It also really depends upon how large this glossary is. I'm jut guessing, but it is definitions for maybe less than 100 words and maybe in the 100-200k range it could be just fine to load the whole thing.
Of course it also depends upon how often it will be accessed and what kind of delivery/bandwidth you are planning.
But it all really depends upon what you are trying to accomplish.
Rob, how fluent are you with php and mysql and does your servers environment support it?
I am trying to create a glossary in Flash. About 300 words. The user can click on a letter of the alphabet and words starting with that letter will appear. Then the user clicks on a word and the definition appears.
I just wanted the words and definitions read from an external file.
I don't know. For the simplicity, I would probably be tempted to just go with it as one file. Have you put it all together to see how big the file is?
Also I would definitely recommend doing it with XML.
To do it as you specify it would require 26 folders. each folder is obviously one letter. one file for each word to hold the definition and then another file that would hold the list. That's the simplest way to do it the way you desire.
I might as well just hard-code it - put all the info. in the Flash file !
In Authorware I would just read in the file and do something like << myText = (LineX, externalFile).
There's nothing like that in Flash ?
I can load a file with the "A" words into an html.text field and using the asFunction I can click on each word and pass a unique variable to a function.
But how do I retrieve the correct definition from say an .xml file ?
I have studied the .xml tutorial on gotoAndLearn.