Remote text file layout with links
===

I have a text file(txt) in my web server. I will read the file contents and show it to user. The problem is that it does not show line separations and spaces the right way. Also i will need to activate possible links. For example if there is http://www.google.com then user can just click on the link and default browser opens it.

So far i have this: 

    var fileContents:String;
    			
    			try{
    				
    				var myLoader:URLLoader = new URLLoader();
    				myLoader.addEventListener(Event.COMPLETE, onFileLoaded);
    				myLoader.load(new URLRequest("http://my.website.com/test.txt"));
    				
    				function onFileLoaded(e:Event):void
    				{
    					fileContents = String(e.currentTarget.data);
    					var alertMessage = fileContents;

I have done this same think in java, but I am not so familiar with ActionScript.

Java code: 


    URL url = new URL(getString(R.string.url));
    
    				BufferedReader r = new BufferedReader(new InputStreamReader(
    						url.openStream(), "UTF-8"));
    				StringBuilder total = new StringBuilder();
    				String line;
    				while ((line = r.readLine()) != null) {
    					total.append(line);
    					total.append(System.getProperty("line.separator"));
    
    				}
    				str = total.toString();
    				r.close();
    
    				return str;

