Index: /trunk/as3/com/jeroenwijering/plugins/Captions.as
===================================================================
--- /trunk/as3/com/jeroenwijering/plugins/Captions.as	(revision 161)
+++ /trunk/as3/com/jeroenwijering/plugins/Captions.as	(revision 165)
@@ -152,5 +152,4 @@
 	private function itemHandler(evt:ControllerEvent=null):void {
 		current = 0;
-		captions = new Array();
 		var fil:String = view.playlist[view.config['item']]['captions.file'];
 		if(fil) { 
@@ -169,5 +168,7 @@
 	/** Captions are loaded; now display them. **/
 	private function loaderHandler(evt:Event):void {
-		if(config['file'].substr(-3) == 'srt') {
+		var ext:String = config['file'].substr(-3);
+		captions = new Array();
+		if(ext == 'srt' || ext == 'txt') {
 			captions = SRTParser.parseCaptions(String(evt.target.data));
 		} else { 
@@ -201,5 +202,4 @@
 			}
 		}
-
 	};
 
@@ -208,5 +208,5 @@
 	private function timeHandler(evt:ModelEvent):void {
 		var pos:Number = evt.data.position;
-		if(captions.length > 0 && (captions[current]['begin'] > pos || captions[current+1]['begin'] < pos)) {
+		if(captions && (captions[current]['begin'] > pos || captions[current+1]['begin'] < pos)) {
 			setCaption(pos);
 		}
