All pastes #925225 Raw Edit

Mine

public text v1 · immutable
·published 2008-03-02 04:18 UTC
rendered paste body
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
	 backgroundColor="0x000000" 
	 width="100%" 
	 height="163" 
	 initialize="requestStream()"  
	 horizontalScrollPolicy="off" 
	 verticalScrollPolicy="off"
	 paddingTop="0"
	 paddingBottom="0"
	  verticalAlign="middle" horizontalAlign="middle" backgroundGradientAlphas="[1.0, 1.0]" backgroundGradientColors="[#FFFFFF, #FFFFFF]">
	 
	<mx:Script>
		<![CDATA[
			import mx.controls.Text;
			import mx.collections.ArrayCollection;
			import mx.rpc.events.ResultEvent;
			
			[Bindable]
			private var twitterFeed:ArrayCollection;
			private var deliciousFeed:ArrayCollection;
			private var instapaperFeed:ArrayCollection;
			private var techniColors:Array;
			
			private function init():void {
				requestStream();
				this.techniColors = new Array("#0063dc","#9ae4e8","#31363e","#f64c32","#0281ca","#8a8a8a","#750202","#be2121","#a88548","#6498cc","#f6270c","#93d928","#dee5e0");
			}
			
			private function requestStream():void {
				trace("requesting Stream");
				twitterSingle.text = "Fetching Data";
				deliciousSingle.text = "Fetching Data";
				instapaperSingle.text = "Fetching Data";
				twitterService.cancel();
				deliciousService.cancel();
				instapaperService.cancel();
				getRandomColor();
				var params:Object = new Object();
				twitterService.send();
				deliciousService.send();
				instapaperService.send();
			}
			
			private function streamHandler(event:ResultEvent):void {
				//twitterFeed = event.result.feed.entry as ArrayCollection;
				var twitts:String = new String();
				trace("EVENTS ARE BACK" + event.result.feed.entry.length);
				for (var i:Number = 0; i < event.result.feed.entry.length; i++) {
					trace("me again " + i);
					 twitts += event.result.feed.entry[i].title + "\n\n";
				}
				
				twitterSingle.text = twitts.toString();
				//twitterSingle.setStyle("color",techniColors[Math.abs(Math.random(techniColors.length))]);
			}
			
			private function deliciousHandler(event:ResultEvent):void {
				deliciousFeed = event.result.feed.entry as ArrayCollection;
				//var newColor:String = techniColors[3];
				var durls:String = new String();
				trace("EVENTS ARE BACK" + event.result.feed.entry.length);
				for (var i:Number = 0; i < event.result.feed.entry.length; i++) {
					trace("me again " );
					 durls += "<a href='event.result.feed.entry[i].link.href' target='_new'>" + event.result.feed.entry[i].title + "</a>" + "\n\n";
				}
				
				deliciousSingle.htmlText = durls.toString();
				deliciousSingle.setStyle("color","#9ae4e8");
			}
			
			private function getRandomColor():String {
				var randSeed:Number = new Number(Math.random() * this.techniColors.length);
				var techniColor:String = this.techniColors[1];
				trace("techniColor " + techniColor);
				return techniColor;
			}
			
			private function instapaperHandler(event:ResultEvent):void {
				instapaperFeed = event.result.rss.channel.item as ArrayCollection;
				trace(" " + instapaperFeed.length)
				var instaurls:String = new String();
				trace("EVENTS ARE BACK" + instapaperFeed.length);
				for (var i:Number = 0; i < instapaperFeed.length; i++) {
					trace("me again " );
					 instaurls += "<a href='instapaperFeed[i].link.href' target='_new'>" + instapaperFeed[i].title + "</a>" + "\n\n";
				}
				
				instapaperSingle.htmlText = instaurls.toString();
			}
			
			private function twittHandler(event:Event):void {
				trace("You clicked on the label");
			}
		]]>
	</mx:Script>
	<mx:HTTPService id="twitterService" url="http://www.kubeworks.com/proxy.cfm?foeURL=http://twitter.com/statuses/user_timeline/2677771.atom" result="streamHandler(event)" contentType="application/xml"  />
	<mx:HTTPService id="deliciousService" url="http://www.kubeworks.com/proxy.cfm?foeURL=http://www.google.com/reader/public/atom/user/12362690709515493747/state/com.google/broadcast" result="deliciousHandler(event)"  />
	<mx:HTTPService id="instapaperService" url="http://www.kubeworks.com/proxy.cfm?foeURL=http://www.instapaper.com/rss/7501/reVAi0tXoncy98z7m4SR0Dkl5s" result="instapaperHandler(event)"  />
	<mx:Canvas width="100%" height="100%" x="0" id="cParent">
		<mx:Canvas width="30%" height="100%" left="0">
			<mx:TextArea text="Text" id="twitterSingle" width="100%" height="133" color="#FFFFFF" fontFamily="Arial" cacheAsBitmap="true"  fontSize="11"  y="23" borderThickness="0" backgroundColor="#0E0E0E"/>
			<mx:Image source="twitter.png" scaleContent="true" autoLoad="true" width="35%" height="35%" x="0" y="4"/>
		</mx:Canvas>
		<mx:Canvas width="30%" height="100%" y="0" horizontalCenter="-27">
			<mx:TextArea text="Text" id="deliciousSingle" width="100%" height="133" color="#FFFFFF" fontFamily="Arial" cacheAsBitmap="true"  fontSize="11"  y="23" borderThickness="0" backgroundColor="#0E0E0E" />
			<mx:Label text="Google Share" color="#FFFFFF" fontSize="12" x="0" y="1"/>
		</mx:Canvas>
		<mx:Canvas width="30%" height="100%" y="0" right="64">
			<mx:TextArea text="Text" id="instapaperSingle" width="100%" height="133" color="#9ae4e8" fontFamily="Arial" cacheAsBitmap="true"  fontSize="11"  y="23" borderThickness="0" backgroundColor="#0E0E0E"/>
			<mx:Label x="0" y="1" text="Intrapaper" color="#FFFFFF" fontSize="12"/>
		</mx:Canvas>
	</mx:Canvas>
	
</mx:Application>