title: Twitter + AS3?
body: <p>With this code in "Actions" in Flash CS5.5 (AS3) I'm trying to show tweets from a specific user. When I test the movie I see the tweets in "Output", but not on the stage. <strong>How do I make them visible on the stage?</strong> I guess I need a TextArea or something on the stage to show them, but I'm not good at writing AS3 and can't seem to make the TextArea and the Actions-code connect.</p>
  
  <pre><code>/**** vars ****/
  var user:String;
  var url:String;
  var tweetCount:int;
  var tweets:Array;
  var times:Array;
  
  /**** setup ****/
  user = "leifpagrotsky";
  tweetCount = 10;
  loadTweets();
  
  /**** start getting tweets ****/
  function loadTweets()
  {
  url = "http://search.twitter.com/search.atom?q=+from:"+user+"&amp;rpp="+tweetCount;
  var urlReq:URLRequest = new URLRequest(url);
  var loader:URLLoader = new URLLoader();
  loader.addEventListener(Event.COMPLETE, getTweets);
  loader.addEventListener(IOErrorEvent.IO_ERROR, IOError);
  loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, SError);
  loader.load(urlReq);
  }
  
  
  function getTweets(e:Event):void
  {
  if ( e.target.data )
  {
  tweets = new Array(); times = new Array();
  var twitterXML:XML = new XML(e.target.data);
  var tweetList:XMLList = twitterXML.children();
  var tweetItem:String; var timeItem:String;
  for (var i:int = 0; i &lt; tweetList.length(); i++)
  {
  tweetItem = tweetList[i].*::title;
  timeItem = tweetList[i].*::published;
  if ( tweetItem != "" )
  {
  tweets.push(tweetItem);
  trace(tweetItem);
  }
  if ( timeItem != "" )
  {
  timeItem = timeItem.split("T").join(" - ");
  timeItem = timeItem.split("Z").join("");
  times.push(timeItem);
  trace(timeItem);
  }
  }
  trace(tweets.length);
  }
  }
  
  function IOError(e:Event):void
  {
  trace("io error!");
  }
  function SError(e:Event):void
  {
  trace("security error!");
  }
  </code></pre>