Embedding text files in a Flex Application

One of my team member had a query on how to embed a text file in a Flex Application. We searched the help files but in vain.

The text cannot be retrieved if we use the following (Instead it will be better if I say, we didn’t find a way to retrieve it 🙂 ) –

[Embed(source="text.txt",mimeType="application/octet-stream")]
private var TextClass : Class;

Then I came across the way on how to do it (though I don’t remember the exact source).

I’m posting it here as it may be helpful to the other developers.

Here are the files –
TestingEmbeddedText.mxml
EmbeddedText.as
text.txt