summaryrefslogtreecommitdiff
path: root/bPod/com/feeds/FeedItemSelectionSystem.as
blob: e928f7330f313b712ddb4bf9b0ce31d8fd782c90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import com.threads.ThreadSelectionSystem;
import com.services.BuckyServices;

class com.feeds.FeedItemSelectionSystem extends ThreadSelectionSystem {

	private var itemsPerRow:Number		=	1;
	private var vertSpace:Number		=	1;
		
	public function doAction():Void {
	
		var theItem:Object	=	systemData[getCurrentSelection()];
		
		var theDesc:String	=	stripTags (theItem.desc);
		
/*		if (theDesc.length <= 1 )
			trace ( stripTags (theItem.desc) );
		else
			trace (theItem.link ); */
			
		
		getURL (theItem.link , "_blank");
		
				
/*		for (var prop in theItem) {
			trace (prop + " : " + theItem[prop]);
		}*/
	}
	
	
	private function stripTags (s:String):String
	{
		var gay:Boolean = false;
		
		var a:Array = s.split ("");
		var b:Array = new Array ();
		
		for (var i = 0; i < a.length; i++)
		{
			if (a[i] == '<')
			{
				gay = true;
			}
			else if (a[i] == '>')
			{
				gay = false;
			}
			else if (!gay)
			{
				b.push (a[i]);
			}
		}
		
/*		var final:String	=	b.join("");

		trace ("final == " + final);

		return final;
*/		
  		return b.join ("");


	}
	
};