|
-
Hi again 5Tons,
I have been working on your code, but without result. Helped, I have written another code that works. I accept any suggestion, thank you:
Actionscript Code:
var reload:Timer = new Timer(5000, 0); reload.addEventListener(TimerEvent.TIMER, onTimer); function onTimer(event:TimerEvent):void{
var myTextLoader:URLLoader = new URLLoader(); myTextLoader.addEventListener(Event.COMPLETE, onLoaded);
function onLoaded(e:Event):void {
var lines:Array = e.target.data.split("\n"); var lastLine:String = lines[lines.length - 1]; var artistAndSong:String = lastLine.substr(24).split(" - ").join("\n"); track_info.text = artistAndSong; addChild(track_info);
}
myTextLoader.load(new URLRequest("tracks.txt")); } reload.start();
Let me ask you one more question. The software that auto-generates the log files, creates one in each session, so I have in the directory something like this:
tracks,236.txt
tracks,235.txt
tracks,234.txt
...
Could it be opened automatically, the latest track file with actionscript?
TIA.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|