i tried actionscript recently,am little scared i want to make a game that input a word from about 3000 randomly, do actionscript support that,or should i try another language?
|
The question isn't really about ActionScript supporting it, but rather if your output platform supports it. With Flash/ActionScript you can build AIR applications, which can read files (all kinds of files) from the file-system (using the FileStream class). If want to create a SWF file that runs in a web-browser instead, So yes, loading such a file and picking words randomly should be easy, as long as you use the correct methods to load it... |
|||
|
AS3: Do you want to the change the word collection frequently? You could embed the word collection in the game itself using:
If it is under 10,000 words, I would create a static literal vector of all the words.
This can be accomplished easily with a Text Editor like notepad++ or running some simple regular expression on the text content of the file. You will likely wanna replace all line breaks ("\n") with a comma (","). This would save you the time of messing with loading assets externally. Which according to my best knowledge is not approved of in some game websites. |
|||||||||
|