There is some way to make the flash put the content of one text file in a string, or at least put it in the .swf, so the user don't need to download it?
A:
I've always used a pre-compile step to populate a template. It's pretty easy to make a class that has a string to be populated before compilation.
Ant can do this pretty easily. Check out the replace task.
Its documentation is here: http://ant.apache.org/manual/CoreTasks/replace.html
ablerman
2010-02-02 22:37:58
What does apache can teach me about actionscript 3? o_OI mean, flash is compiled, I don't think the text can be replaced by the apache.
M28
2010-02-02 22:43:40
The apache project umbrella contains a whole host of subprojects. One of which is a build system called ant.
ablerman
2010-02-02 23:20:36
+2
A:
Solution:
[Embed(source = "ExampleText.txt", mimeType = "application/octet-stream")]
protected var pscene:Class;
var tmp:ByteArray = new pscene();
result = tmp.readMultiByte(tmp.bytesAvailable, tmp.endian);
It took me a while to understand how to read the data from the Byte Array.
M28
2010-02-02 23:38:59