<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
	xmlns:media="http://search.yahoo.com/mrss/"
	>
<channel>
	<title>Comments on: Tutorial: Twitter Updates in Flash Part 2</title>
	<atom:link href="http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/</link>
	<description>We Make Flash Games</description>
	<lastBuildDate>Fri, 10 Feb 2012 03:01:47 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: James</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-8410</link>
		<dc:creator>James</dc:creator>
		<pubDate>Fri, 17 Jun 2011 09:37:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-8410</guid>
		<description>Hmm, I use your Tutorial 2 action script, only I have 3 dynamic texts.
The problem is only if you go to another page and go back then it&#039;s still loading...
And when you type: www.zangpraktijk.nl/twitter it&#039;s working.. Very strange.
I hope you can find a solution.</description>
		<content:encoded><![CDATA[<p>Hmm, I use your Tutorial 2 action script, only I have 3 dynamic texts.<br />
The problem is only if you go to another page and go back then it&#8217;s still loading&#8230;<br />
And when you type: <a href="http://www.zangpraktijk.nl/twitter" rel="nofollow">http://www.zangpraktijk.nl/twitter</a> it&#8217;s working.. Very strange.<br />
I hope you can find a solution.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan Henson Creighton</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-8404</link>
		<dc:creator>Ryan Henson Creighton</dc:creator>
		<pubDate>Thu, 16 Jun 2011 16:52:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-8404</guid>
		<description>It&#039;s throwing an error in my debug player ...</description>
		<content:encoded><![CDATA[<p>It&#8217;s throwing an error in my debug player &#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-8402</link>
		<dc:creator>James</dc:creator>
		<pubDate>Thu, 16 Jun 2011 15:35:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-8402</guid>
		<description>Hey,

When I go to the homepage of my website then I can see my tweets, but when I go to another page and press again on home then it is saying &quot;loading...&quot; how to automatically refresh this script?

Thanks!

See: www.zangpraktijk.nl/twitter</description>
		<content:encoded><![CDATA[<p>Hey,</p>
<p>When I go to the homepage of my website then I can see my tweets, but when I go to another page and press again on home then it is saying &#8220;loading&#8230;&#8221; how to automatically refresh this script?</p>
<p>Thanks!</p>
<p>See: <a href="http://www.zangpraktijk.nl/twitter" rel="nofollow">http://www.zangpraktijk.nl/twitter</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: matt</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-8279</link>
		<dc:creator>matt</dc:creator>
		<pubDate>Fri, 03 Jun 2011 01:03:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-8279</guid>
		<description>quick question:

is there any way to display the relative time that the last tweet was made?  like &quot;43 minutes ago&quot; or &quot;two days ago&quot;, etc.</description>
		<content:encoded><![CDATA[<p>quick question:</p>
<p>is there any way to display the relative time that the last tweet was made?  like &#8220;43 minutes ago&#8221; or &#8220;two days ago&#8221;, etc.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan Henson Creighton</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-7197</link>
		<dc:creator>Ryan Henson Creighton</dc:creator>
		<pubDate>Mon, 06 Dec 2010 03:45:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-7197</guid>
		<description>Tom - it may be an addedToStage problem ... you might be trying to put text into a TextField on your stage before it&#039;s available.</description>
		<content:encoded><![CDATA[<p>Tom &#8211; it may be an addedToStage problem &#8230; you might be trying to put text into a TextField on your stage before it&#8217;s available.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-7145</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Mon, 29 Nov 2010 18:42:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-7145</guid>
		<description>Hi Ryan, awesome website and tutorials, I believe I may be having the same problem as steve p, but noone posted a solution....

I&#039;m copying the code here, and changing everything that is required. But am getting these errors:


TypeError: Error #2007: Parameter text must be non-null.
	at flash.text::TextField/set htmlText()
	at Main/showTwitterStatus()
	at Main/loadTwitterDataFromFlashCookie()
	at Main()

Any thoughts?

Coincidentally if I comment all references of twitter_txt in the showTwitterStatus function and uncomment the trace(twitterXML); the error goes away but it does not trace the stuff twitter sends you.

If you&#039;ve got any thoughts it would be good to hear them. Thanks in advance.</description>
		<content:encoded><![CDATA[<p>Hi Ryan, awesome website and tutorials, I believe I may be having the same problem as steve p, but noone posted a solution&#8230;.</p>
<p>I&#8217;m copying the code here, and changing everything that is required. But am getting these errors:</p>
<p>TypeError: Error #2007: Parameter text must be non-null.<br />
	at flash.text::TextField/set htmlText()<br />
	at Main/showTwitterStatus()<br />
	at Main/loadTwitterDataFromFlashCookie()<br />
	at Main()</p>
<p>Any thoughts?</p>
<p>Coincidentally if I comment all references of twitter_txt in the showTwitterStatus function and uncomment the trace(twitterXML); the error goes away but it does not trace the stuff twitter sends you.</p>
<p>If you&#8217;ve got any thoughts it would be good to hear them. Thanks in advance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan Janssen</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-6077</link>
		<dc:creator>Stefan Janssen</dc:creator>
		<pubDate>Fri, 16 Jul 2010 19:45:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-6077</guid>
		<description>Hi Ryan,

You can call me a newbie, but i got some little flash experience. This is the first time i work with AS3. 
For mounts i&#039;m trying to get this code working, but still the same result: Loading twitter status...
I checked so many options out of these comments of other users, but i really get stucked.

Like someone said before; on my local machine i can get the first tutorial-attachment working, only with your feeds. If i change just my twitter ID, it&#039;s working but only on my local machine. 

I tried several times the code on the page of the first part of this tutorial, which is different, and i fill out the right php path.
That also failed to work. 
The code above looks great, and i quite understand everything, but i&#039;m confused that i can&#039;t get it working. 
It all shows&quot; Loading twitter status....&quot;

I did a lot of research in the code.
And I think the php-file causes the failure.
I checked the paths, and I also tested with www and without, relative paths etc. (the Main.as and the twitter.php are in the same directory on the server as my twitter.swf file) 
My webserver is of course compatible with php.

I&#039;m checking the swf file with Firefox, Safari and Chrome browsers. 
Firefox said in its status bar that when i&#039;m opening the swf, it starts reading the twitterpage, and finish succesfully. But then again no result on my twitter_txt field.

Some questions to make it a bit clear for me:
1) I&#039;m using the PHP file of the first part of this tutorial and named it &quot;twitter.php&quot; is that oke?
2) To pretent www-mistakes, can i use a relative path for the php-file definition, like: twitterPHPScriptPath = &quot;twitter.php&quot;;
3) Which of those 3 Main.as scripts do you advise me to use? Do they all work on a webserver?
4) Does it make sence if i use my twitter ID or my twitter ID number? Do I have to provide the &quot; &quot; signs?
5) How does the Main.as file hit the php-file? Can I check this?
6) Any idea why it isn&#039;t working if i just adjust the twitter ID, the php-file path and twitter.swf, twitter.php and Main.as upload to my webserver? 

If you are able to get some answers for me, i would be really really glad! 
And I hope you could help me to get this cool thing done.
Thanx in advance! 

Stefan (from NL)</description>
		<content:encoded><![CDATA[<p>Hi Ryan,</p>
<p>You can call me a newbie, but i got some little flash experience. This is the first time i work with AS3.<br />
For mounts i&#8217;m trying to get this code working, but still the same result: Loading twitter status&#8230;<br />
I checked so many options out of these comments of other users, but i really get stucked.</p>
<p>Like someone said before; on my local machine i can get the first tutorial-attachment working, only with your feeds. If i change just my twitter ID, it&#8217;s working but only on my local machine. </p>
<p>I tried several times the code on the page of the first part of this tutorial, which is different, and i fill out the right php path.<br />
That also failed to work.<br />
The code above looks great, and i quite understand everything, but i&#8217;m confused that i can&#8217;t get it working.<br />
It all shows&#8221; Loading twitter status&#8230;.&#8221;</p>
<p>I did a lot of research in the code.<br />
And I think the php-file causes the failure.<br />
I checked the paths, and I also tested with www and without, relative paths etc. (the Main.as and the twitter.php are in the same directory on the server as my twitter.swf file)<br />
My webserver is of course compatible with php.</p>
<p>I&#8217;m checking the swf file with Firefox, Safari and Chrome browsers.<br />
Firefox said in its status bar that when i&#8217;m opening the swf, it starts reading the twitterpage, and finish succesfully. But then again no result on my twitter_txt field.</p>
<p>Some questions to make it a bit clear for me:<br />
1) I&#8217;m using the PHP file of the first part of this tutorial and named it &#8220;twitter.php&#8221; is that oke?<br />
2) To pretent www-mistakes, can i use a relative path for the php-file definition, like: twitterPHPScriptPath = &#8220;twitter.php&#8221;;<br />
3) Which of those 3 Main.as scripts do you advise me to use? Do they all work on a webserver?<br />
4) Does it make sence if i use my twitter ID or my twitter ID number? Do I have to provide the &#8221; &#8221; signs?<br />
5) How does the Main.as file hit the php-file? Can I check this?<br />
6) Any idea why it isn&#8217;t working if i just adjust the twitter ID, the php-file path and twitter.swf, twitter.php and Main.as upload to my webserver? </p>
<p>If you are able to get some answers for me, i would be really really glad!<br />
And I hope you could help me to get this cool thing done.<br />
Thanx in advance! </p>
<p>Stefan (from NL)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Corey Sayers</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-5903</link>
		<dc:creator>Corey Sayers</dc:creator>
		<pubDate>Wed, 02 Jun 2010 12:23:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-5903</guid>
		<description>Thanks Ryan, that was just a thought.  But thanks so much for this.  This is an AWESOME introduction shared objects, something that I have not worked with yet.  Keep the killer tutorials coming!</description>
		<content:encoded><![CDATA[<p>Thanks Ryan, that was just a thought.  But thanks so much for this.  This is an AWESOME introduction shared objects, something that I have not worked with yet.  Keep the killer tutorials coming!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-5858</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Fri, 28 May 2010 10:29:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-5858</guid>
		<description>Corey-  that&#039;s exactly what we&#039;re doing.  But with the number of people telling me &quot;i don&#039;t know how to program - can you help me re-write this in Actionscript 1?&quot;, i thought it best to just leave it at this  :)</description>
		<content:encoded><![CDATA[<p>Corey-  that&#8217;s exactly what we&#8217;re doing.  But with the number of people telling me &#8220;i don&#8217;t know how to program &#8211; can you help me re-write this in Actionscript 1?&#8221;, i thought it best to just leave it at this  :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Corey Sayers</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-5857</link>
		<dc:creator>Corey Sayers</dc:creator>
		<pubDate>Fri, 28 May 2010 10:10:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-5857</guid>
		<description>Also, to get around the rate limiting, couldn&#039;t you just write a PHP file that pulls all of the XML from twitter and saves it to your server, then you just have parse that XML?  You could call that web service every minute with a CRON scheduler, which would only be 60 calls per hour and be an unlimited number on your server?  

Thoughts?</description>
		<content:encoded><![CDATA[<p>Also, to get around the rate limiting, couldn&#8217;t you just write a PHP file that pulls all of the XML from twitter and saves it to your server, then you just have parse that XML?  You could call that web service every minute with a CRON scheduler, which would only be 60 calls per hour and be an unlimited number on your server?  </p>
<p>Thoughts?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Corey Sayers</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-5850</link>
		<dc:creator>Corey Sayers</dc:creator>
		<pubDate>Thu, 27 May 2010 19:55:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-5850</guid>
		<description>timg,

Here is a function that looks for a link inside of your tweet, then makes it a hyperlink and changes the color. 

public function createURLInsideofString(twitterPost:String):String
		{
			
				var doesHaveURLText:String = twitterPost;//;
				var urlstart = 0;
				var urlend = 0;
				var url_prefix:String = &quot;&quot;;
				
				if (doesHaveURLText.indexOf(&quot;http://&quot; &#124;&#124; &quot;www.&quot;) != -1) {
					
					urlstart = doesHaveURLText.indexOf(&quot;http://&quot; &#124;&#124; &quot;www&quot;);
					
					if (doesHaveURLText.indexOf(&quot; &quot;, urlstart) != -1) {
						urlend = doesHaveURLText.indexOf(&quot; &quot;, urlstart);
				
					} else {
						urlend=doesHaveURLText.length;
					}
					
					if (doesHaveURLText.indexOf(&quot;http://&quot;,urlstart) == -1) {
						url_prefix = &quot;http://&quot;;
					} else {
						url_prefix = &quot;&quot;;
					}
					
					return doesHaveURLText.substring( 0,urlstart)+&quot;&lt;a href=&#039;&quot;+url_prefix+doesHaveURLText.substring(urlstart,urlend)+&quot;&#039; rel=&quot;nofollow&quot;&gt;&quot;+doesHaveURLText.substring(urlstart,urlend)+&quot;&lt;/a&gt;&quot;+doesHaveURLText.substring(urlend,doesHaveURLText.length);
				
				} else {
					return twitterPost;
				}		
							
		} 


Just call that function like so,

textFeild.htmlText = createURLInsideofString(twitterXML.status.text[i]);

then your link will be highlighted, underlined and clickable.  

Hope that helps,</description>
		<content:encoded><![CDATA[<p>timg,</p>
<p>Here is a function that looks for a link inside of your tweet, then makes it a hyperlink and changes the color. </p>
<p>public function createURLInsideofString(twitterPost:String):String<br />
		{</p>
<p>				var doesHaveURLText:String = twitterPost;//;<br />
				var urlstart = 0;<br />
				var urlend = 0;<br />
				var url_prefix:String = &#8220;&#8221;;</p>
<p>				if (doesHaveURLText.indexOf(&#8220;http://&#8221; || &#8220;www.&#8221;) != -1) {</p>
<p>					urlstart = doesHaveURLText.indexOf(&#8220;http://&#8221; || &#8220;www&#8221;);</p>
<p>					if (doesHaveURLText.indexOf(&#8221; &#8220;, urlstart) != -1) {<br />
						urlend = doesHaveURLText.indexOf(&#8221; &#8220;, urlstart);</p>
<p>					} else {<br />
						urlend=doesHaveURLText.length;<br />
					}</p>
<p>					if (doesHaveURLText.indexOf(&#8220;http://&#8221;,urlstart) == -1) {<br />
						url_prefix = &#8220;http://&#8221;;<br />
					} else {<br />
						url_prefix = &#8220;&#8221;;<br />
					}</p>
<p>					return doesHaveURLText.substring( 0,urlstart)+&#8221;<a href='"+url_prefix+doesHaveURLText.substring(urlstart,urlend)+"' rel="nofollow">&#8220;+doesHaveURLText.substring(urlstart,urlend)+&#8221;</a>&#8220;+doesHaveURLText.substring(urlend,doesHaveURLText.length);</p>
<p>				} else {<br />
					return twitterPost;<br />
				}		</p>
<p>		} </p>
<p>Just call that function like so,</p>
<p>textFeild.htmlText = createURLInsideofString(twitterXML.status.text[i]);</p>
<p>then your link will be highlighted, underlined and clickable.  </p>
<p>Hope that helps,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-5627</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Thu, 29 Apr 2010 18:56:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-5627</guid>
		<description>There sure is!  Look up the TextFormat class.</description>
		<content:encoded><![CDATA[<p>There sure is!  Look up the TextFormat class.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: timg</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-5623</link>
		<dc:creator>timg</dc:creator>
		<pubDate>Thu, 29 Apr 2010 15:58:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-5623</guid>
		<description>Is there a way to make a link in a tweet clickable and a different color?</description>
		<content:encoded><![CDATA[<p>Is there a way to make a link in a tweet clickable and a different color?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Larry</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-5577</link>
		<dc:creator>Larry</dc:creator>
		<pubDate>Thu, 22 Apr 2010 14:57:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-5577</guid>
		<description>Javier, thanks so much for posting AS 2 code for us dinosaurs.
I&#039;m a bit confused how to actually implement it-- how do i actually get the class to interact with the text field? Also, I&#039;m not seeing anything in the output.
Thanks for your help!
Larry</description>
		<content:encoded><![CDATA[<p>Javier, thanks so much for posting AS 2 code for us dinosaurs.<br />
I&#8217;m a bit confused how to actually implement it&#8211; how do i actually get the class to interact with the text field? Also, I&#8217;m not seeing anything in the output.<br />
Thanks for your help!<br />
Larry</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Javier</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-5409</link>
		<dc:creator>Javier</dc:creator>
		<pubDate>Sun, 21 Mar 2010 13:34:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-5409</guid>
		<description>Hi Ryan Great class!! Thank You Very Much for sharing it too!! 

@Justin: here is the as2 code, it is working i`d downgraded Ryan`s great class, to use on a project that does not supported as3 (it was on a projector embedded into office `07), also here is a very handy tool to convert you as2 code into as3 while you`re learning it, http://www.5etdemi.com/blog/archives/2006/11/as2-to-as3-converter-createtextfield-geturl-handling/ , hope anyone with the same issue find it usefull, again Ryan you`re the man thank you very much!.
[code]
...import Proxy;

class Twitter extends MovieClip
{
	private var twitterXML : XML;
	private var twitterPHPScriptPath : String;
	private var myTwitterID : String;
	private var twitterText : TextField;
	private var statusInterval : Number;
	private var cicle : Number = 0;
	private var cookie : SharedObject;
	private var writeCookie : Boolean;
	private var currDate : Date;

	public function Twitter()
	{
		this.myTwitterID = &quot;jzhouVIP&quot;;
		this.twitterPHPScriptPath = &quot;http://localhost/twitter.php&quot;;
		this.writeCookie = true;
		this.loadDataFromCookie();
	}

	private function loadDataFromCookie() : Void
	{
		this.cookie = SharedObject.getLocal(&quot;twitter&quot;);
		var timeStamp : Date = this.cookie.data.timeStamp;
		
		if (timeStamp != null)
		{
			if (hasExpired(timeStamp))
			{
				trace(&quot;cookie has expired!  let&#039;s get some fresh data&quot;);
				this.loadTwitterXML();		
			} 
			else
			{					
				trace(&quot;cookie is fresh. display the data.&quot;);
				this.twitterXML = this.cookie.data.twitterXML;
				this.showTwitterStatus();
				this.statusInterval = setInterval (this, &quot;showTwitterStatus&quot;, 10000);
			}
		} 
		else 
		{
			this.loadTwitterXML();				
		}			
	}
	
	private function saveToCookie() : Void
	{
		var flushStatus = null;
		try
		{
			flushStatus = this.cookie.flush(10000);
		} 
		catch (error:Error) 
		{
			trace(&quot;Error...Could not write Cookie to disk\n&quot;);
		}
		
		if (flushStatus != null)
		{
			switch (flushStatus)
			{
				case SharedObject.Flush.Failed:
					trace(&quot;Requesting permission to save object...\n&quot;);
					this.cookie.addEventListener(this, onFlushStatus);
				break;
				case SharedObject.Flush.Success:
					trace(&quot;********* save complete. ***********\n&quot;);
					finishedHandlingTwitterData();
				break;
			}
		}				
	}
	
	private function onFlushStatus() : Void
	{
		trace(&quot;User closed permission dialog...\n&quot;);
		switch (this.cookie.onStatus)
		{
			case &quot;SharedObject.Flush.Success&quot;:
				trace(&quot;User granted permission -- value saved.\n&quot;);
				finishedHandlingTwitterData();
			break;				
			case &quot;SharedObject.Flush.Failed&quot;:
				trace(&quot;User denied permission -- value not saved.\n&quot;);
				this.writeCookie = false;
			break;
		}
		this.cookie.removeEventListener(this, onFlushStatus);
	}
	
	private function finishedHandlingTwitterData() : Void
	{
		trace(&quot;Twitter data saved.&quot;);
	}
	
	private function hasExpired(timeStamp : Date) : Boolean
	{
		var now:Date = new Date();
		var expiryHours:Number = 2;
		var expiryMinutes:Number = 30;
		var expirySeconds:Number = 0;		
		var msPerHour:Number = 3600000;
		var msPerMinute:Number = 60000;
		var msPerSecond:Number = 1000;		
		var expiryTime:Number = (expiryHours * msPerHour) + (expiryMinutes * msPerMinute) + (expirySeconds * msPerSecond);
		
		return (now.getTime() - timeStamp.getTime() &gt; expiryTime);
	}

	private function loadTwitterXML():Void
	{			
		this.twitterXML = new XML();
		this.twitterXML.ignoreWhite = true;
		this.twitterXML.onLoad = Proxy.create(this, finishLoadingXML);
		this.twitterXML.load(this.twitterPHPScriptPath + &quot;?twitterId=&quot; + this.myTwitterID);
		trace(&quot;xml loaded...init&quot;);
	}

	private function finishLoadingXML():Void
	{				    					
		this.cookie = SharedObject.getLocal(&quot;twitter&quot;);
		this.cookie.data.timeStamp = new Date();
		this.cookie.data.twitterXML = this.twitterXML;	
		this.saveToCookie();
		this.showTwitterStatus();
		this.statusInterval = setInterval (this, &quot;showTwitterStatus&quot;, 10000);
	}

	private function showTwitterStatus():Void
	{			
		if(cicle &lt; this.twitterXML.firstChild.childNodes.length &#124;&#124; cicle &lt; this.cookie.data.twitterXML.length)
		{
			trace(&quot;cicle &quot;+cicle);
			this.twitterText.autoSize = true;
			this.twitterText.embedFonts = true;
			this.twitterText.htmlText += this.twitterXML.firstChild.childNodes[cicle].childNodes[2] + &quot;\n&quot;;
			cicle++;
		}
		else
		{
			clearInterval(this.statusInterval);
			trace(&quot;no more entries to display...aborting&quot;);
		}
	}
}//end of class
...
[/code]
[code]
...class Proxy 
{
    public static function create(oTarget : Object, fFunction : Function) : Function 
    {
        var aParameters : Array = new Array();
        for(var i : Number = 2;i &lt; arguments.length; i++) 
        {
            aParameters[i - 2] = arguments[i];
        }
        var fProxy : Function = function():Void 
        {
            var aActualParameters : Array = arguments.concat(aParameters);
            fFunction.apply(oTarget, aActualParameters);
        };
        return fProxy;
    }
}
...
[/code]</description>
		<content:encoded><![CDATA[<p>Hi Ryan Great class!! Thank You Very Much for sharing it too!! </p>
<p>@Justin: here is the as2 code, it is working i`d downgraded Ryan`s great class, to use on a project that does not supported as3 (it was on a projector embedded into office `07), also here is a very handy tool to convert you as2 code into as3 while you`re learning it, <a href="http://www.5etdemi.com/blog/archives/2006/11/as2-to-as3-converter-createtextfield-geturl-handling/" rel="nofollow">http://www.5etdemi.com/blog/archives/2006/11/as2-to-as3-converter-createtextfield-geturl-handling/</a> , hope anyone with the same issue find it usefull, again Ryan you`re the man thank you very much!.<br />
[code]<br />
...import Proxy;</p>
<p>class Twitter extends MovieClip<br />
{<br />
	private var twitterXML : XML;<br />
	private var twitterPHPScriptPath : String;<br />
	private var myTwitterID : String;<br />
	private var twitterText : TextField;<br />
	private var statusInterval : Number;<br />
	private var cicle : Number = 0;<br />
	private var cookie : SharedObject;<br />
	private var writeCookie : Boolean;<br />
	private var currDate : Date;</p>
<p>	public function Twitter()<br />
	{<br />
		this.myTwitterID = "jzhouVIP";<br />
		this.twitterPHPScriptPath = "http://localhost/twitter.php";<br />
		this.writeCookie = true;<br />
		this.loadDataFromCookie();<br />
	}</p>
<p>	private function loadDataFromCookie() : Void<br />
	{<br />
		this.cookie = SharedObject.getLocal("twitter");<br />
		var timeStamp : Date = this.cookie.data.timeStamp;</p>
<p>		if (timeStamp != null)<br />
		{<br />
			if (hasExpired(timeStamp))<br />
			{<br />
				trace("cookie has expired!  let's get some fresh data");<br />
				this.loadTwitterXML();<br />
			}<br />
			else<br />
			{<br />
				trace("cookie is fresh. display the data.");<br />
				this.twitterXML = this.cookie.data.twitterXML;<br />
				this.showTwitterStatus();<br />
				this.statusInterval = setInterval (this, "showTwitterStatus", 10000);<br />
			}<br />
		}<br />
		else<br />
		{<br />
			this.loadTwitterXML();<br />
		}<br />
	}</p>
<p>	private function saveToCookie() : Void<br />
	{<br />
		var flushStatus = null;<br />
		try<br />
		{<br />
			flushStatus = this.cookie.flush(10000);<br />
		}<br />
		catch (error:Error)<br />
		{<br />
			trace("Error...Could not write Cookie to disk\n");<br />
		}</p>
<p>		if (flushStatus != null)<br />
		{<br />
			switch (flushStatus)<br />
			{<br />
				case SharedObject.Flush.Failed:<br />
					trace("Requesting permission to save object...\n");<br />
					this.cookie.addEventListener(this, onFlushStatus);<br />
				break;<br />
				case SharedObject.Flush.Success:<br />
					trace("********* save complete. ***********\n");<br />
					finishedHandlingTwitterData();<br />
				break;<br />
			}<br />
		}<br />
	}</p>
<p>	private function onFlushStatus() : Void<br />
	{<br />
		trace("User closed permission dialog...\n");<br />
		switch (this.cookie.onStatus)<br />
		{<br />
			case "SharedObject.Flush.Success":<br />
				trace("User granted permission -- value saved.\n");<br />
				finishedHandlingTwitterData();<br />
			break;<br />
			case "SharedObject.Flush.Failed":<br />
				trace("User denied permission -- value not saved.\n");<br />
				this.writeCookie = false;<br />
			break;<br />
		}<br />
		this.cookie.removeEventListener(this, onFlushStatus);<br />
	}</p>
<p>	private function finishedHandlingTwitterData() : Void<br />
	{<br />
		trace("Twitter data saved.");<br />
	}</p>
<p>	private function hasExpired(timeStamp : Date) : Boolean<br />
	{<br />
		var now:Date = new Date();<br />
		var expiryHours:Number = 2;<br />
		var expiryMinutes:Number = 30;<br />
		var expirySeconds:Number = 0;<br />
		var msPerHour:Number = 3600000;<br />
		var msPerMinute:Number = 60000;<br />
		var msPerSecond:Number = 1000;<br />
		var expiryTime:Number = (expiryHours * msPerHour) + (expiryMinutes * msPerMinute) + (expirySeconds * msPerSecond);</p>
<p>		return (now.getTime() - timeStamp.getTime() &gt; expiryTime);<br />
	}</p>
<p>	private function loadTwitterXML():Void<br />
	{<br />
		this.twitterXML = new XML();<br />
		this.twitterXML.ignoreWhite = true;<br />
		this.twitterXML.onLoad = Proxy.create(this, finishLoadingXML);<br />
		this.twitterXML.load(this.twitterPHPScriptPath + "?twitterId=" + this.myTwitterID);<br />
		trace("xml loaded...init");<br />
	}</p>
<p>	private function finishLoadingXML():Void<br />
	{<br />
		this.cookie = SharedObject.getLocal("twitter");<br />
		this.cookie.data.timeStamp = new Date();<br />
		this.cookie.data.twitterXML = this.twitterXML;<br />
		this.saveToCookie();<br />
		this.showTwitterStatus();<br />
		this.statusInterval = setInterval (this, "showTwitterStatus", 10000);<br />
	}</p>
<p>	private function showTwitterStatus():Void<br />
	{<br />
		if(cicle &lt; this.twitterXML.firstChild.childNodes.length || cicle &lt; this.cookie.data.twitterXML.length)<br />
		{<br />
			trace(&quot;cicle &quot;+cicle);<br />
			this.twitterText.autoSize = true;<br />
			this.twitterText.embedFonts = true;<br />
			this.twitterText.htmlText += this.twitterXML.firstChild.childNodes[cicle].childNodes[2] + &quot;\n&quot;;<br />
			cicle++;<br />
		}<br />
		else<br />
		{<br />
			clearInterval(this.statusInterval);<br />
			trace(&quot;no more entries to display...aborting&quot;);<br />
		}<br />
	}<br />
}//end of class<br />
...<br />
[/code]<br />
[code]<br />
...class Proxy<br />
{<br />
    public static function create(oTarget : Object, fFunction : Function) : Function<br />
    {<br />
        var aParameters : Array = new Array();<br />
        for(var i : Number = 2;i &lt; arguments.length; i++)<br />
        {<br />
            aParameters[i - 2] = arguments[i];<br />
        }<br />
        var fProxy : Function = function():Void<br />
        {<br />
            var aActualParameters : Array = arguments.concat(aParameters);<br />
            fFunction.apply(oTarget, aActualParameters);<br />
        };<br />
        return fProxy;<br />
    }<br />
}<br />
...<br />
[/code]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-5363</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Mon, 15 Mar 2010 01:10:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-5363</guid>
		<description>Steve - yeeeees, i&#039;m from the paaaaast! (floating around)  Wooooo!!   Everyone here is thiiiiiiiner and has more haaaAAAaaaairrr!</description>
		<content:encoded><![CDATA[<p>Steve &#8211; yeeeees, i&#8217;m from the paaaaast! (floating around)  Wooooo!!   Everyone here is thiiiiiiiner and has more haaaAAAaaaairrr!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: steve p</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-5354</link>
		<dc:creator>steve p</dc:creator>
		<pubDate>Fri, 12 Mar 2010 18:54:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-5354</guid>
		<description>well... i just realized the hosting account I&#039;m testing on may not even support PHP...  d&#039;oh!  tyring to find out for sure</description>
		<content:encoded><![CDATA[<p>well&#8230; i just realized the hosting account I&#8217;m testing on may not even support PHP&#8230;  d&#8217;oh!  tyring to find out for sure</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: steve p</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-5353</link>
		<dc:creator>steve p</dc:creator>
		<pubDate>Fri, 12 Mar 2010 18:51:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-5353</guid>
		<description>hm.... not sure what i&#039;m doing wrong here.  i noticed in the comments that there were some discrepancies between the .zip file posted and the code posted on this actual page, is there one I should or shouldn&#039;t use?  When I post your original files online and test them out your feed comes in fine, but when I change the Main.as file&#039;s myTwitterID and the twitterPHPScriptPath to an absolute path to my php file all I get is the &quot;loading&quot; text.  

I read all the comments about the possible sandbox issues, but I am keeping all my files in the same folder and testing online so I don&#039;t think thats the issue.  

In flash I get the error below, which I noticed someone else mentioned in the first fwitter tutorial.  The only solution I saw was to set the text box to render text as HTML, but that didnt&#039; seem to make a difference.

Any suggestions?

cookie is fresh. display the data.
showTwitterStatus
TypeError: Error #2007: Parameter text must be non-null.
	at flash.text::TextField/set htmlText()
	at Main/showTwitterStatus()
	at Main/loadTwitterDataFromFlashCookie()
	at Main()</description>
		<content:encoded><![CDATA[<p>hm&#8230;. not sure what i&#8217;m doing wrong here.  i noticed in the comments that there were some discrepancies between the .zip file posted and the code posted on this actual page, is there one I should or shouldn&#8217;t use?  When I post your original files online and test them out your feed comes in fine, but when I change the Main.as file&#8217;s myTwitterID and the twitterPHPScriptPath to an absolute path to my php file all I get is the &#8220;loading&#8221; text.  </p>
<p>I read all the comments about the possible sandbox issues, but I am keeping all my files in the same folder and testing online so I don&#8217;t think thats the issue.  </p>
<p>In flash I get the error below, which I noticed someone else mentioned in the first fwitter tutorial.  The only solution I saw was to set the text box to render text as HTML, but that didnt&#8217; seem to make a difference.</p>
<p>Any suggestions?</p>
<p>cookie is fresh. display the data.<br />
showTwitterStatus<br />
TypeError: Error #2007: Parameter text must be non-null.<br />
	at flash.text::TextField/set htmlText()<br />
	at Main/showTwitterStatus()<br />
	at Main/loadTwitterDataFromFlashCookie()<br />
	at Main()</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: steve</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-5350</link>
		<dc:creator>steve</dc:creator>
		<pubDate>Fri, 12 Mar 2010 14:36:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-5350</guid>
		<description>you are hilarious and helpful!  p.s.  your website says copyright 2008, are you from the past?</description>
		<content:encoded><![CDATA[<p>you are hilarious and helpful!  p.s.  your website says copyright 2008, are you from the past?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-5297</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Tue, 09 Mar 2010 22:49:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-5297</guid>
		<description>Curran - thanks!  i *think* Twitter returns nothing once you break the limit, but i&#039;m not sure how that gets read into Flash?  Null?  Dunno.  It&#039;s not very hard to poll Twitter 100 times ... why don&#039;t you be a pioneer?  Break it, and let us all know!

- Ryan</description>
		<content:encoded><![CDATA[<p>Curran &#8211; thanks!  i *think* Twitter returns nothing once you break the limit, but i&#8217;m not sure how that gets read into Flash?  Null?  Dunno.  It&#8217;s not very hard to poll Twitter 100 times &#8230; why don&#8217;t you be a pioneer?  Break it, and let us all know!</p>
<p>- Ryan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Curran</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-5293</link>
		<dc:creator>Curran</dc:creator>
		<pubDate>Tue, 09 Mar 2010 17:03:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-5293</guid>
		<description>Ryan: Sweet tutorial, and I love your website. 
Just one question: do you or anyone in internet land know what gets returned by twitter after 100 calls are exceeded? is it still xml?  Wondering so I can account for it so that my app fails gracefully should that happen. I dont feel like reloading my app 100 times to find out! Thanks.</description>
		<content:encoded><![CDATA[<p>Ryan: Sweet tutorial, and I love your website.<br />
Just one question: do you or anyone in internet land know what gets returned by twitter after 100 calls are exceeded? is it still xml?  Wondering so I can account for it so that my app fails gracefully should that happen. I dont feel like reloading my app 100 times to find out! Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-5276</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Thu, 04 Mar 2010 05:20:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-5276</guid>
		<description>Justin - you (mostly) won&#039;t regret it. 

Try starting here, and reading the Understanding Classes tutorials:

http://www.untoldentertainment.com/blog/flash-and-actionscript-911/</description>
		<content:encoded><![CDATA[<p>Justin &#8211; you (mostly) won&#8217;t regret it. </p>
<p>Try starting here, and reading the Understanding Classes tutorials:</p>
<p><a href="http://www.untoldentertainment.com/blog/flash-and-actionscript-911/" rel="nofollow">http://www.untoldentertainment.com/blog/flash-and-actionscript-911/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-5275</link>
		<dc:creator>Justin</dc:creator>
		<pubDate>Thu, 04 Mar 2010 04:38:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-5275</guid>
		<description>Ryan, you&#039;re totally right. It sounds like I&#039;m building a site for a Commodore 64 or something.

I... guess I can... learn AS3. :)</description>
		<content:encoded><![CDATA[<p>Ryan, you&#8217;re totally right. It sounds like I&#8217;m building a site for a Commodore 64 or something.</p>
<p>I&#8230; guess I can&#8230; learn AS3. :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-5268</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Wed, 03 Mar 2010 14:03:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-5268</guid>
		<description>Justin - why are you stuck on AS2?  Are you deploying to some ancient device?</description>
		<content:encoded><![CDATA[<p>Justin &#8211; why are you stuck on AS2?  Are you deploying to some ancient device?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-5264</link>
		<dc:creator>Justin</dc:creator>
		<pubDate>Wed, 03 Mar 2010 05:08:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-5264</guid>
		<description>Ryan, can&#039;t thank you enough for posting both these tutorials. It&#039;s bonus enough to have these so I probably shouldn&#039;t even ask, but any chance of Fwitter Part 2 for AS2?

I stumbled my way through translating the AS3 from your first tutorial to AS2, but now visitors are exceding the 100 calls limit!</description>
		<content:encoded><![CDATA[<p>Ryan, can&#8217;t thank you enough for posting both these tutorials. It&#8217;s bonus enough to have these so I probably shouldn&#8217;t even ask, but any chance of Fwitter Part 2 for AS2?</p>
<p>I stumbled my way through translating the AS3 from your first tutorial to AS2, but now visitors are exceding the 100 calls limit!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: untoldentertainment.com &#187; Tutorial: Clickify Your Twitter Feed in Flash</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-5098</link>
		<dc:creator>untoldentertainment.com &#187; Tutorial: Clickify Your Twitter Feed in Flash</dc:creator>
		<pubDate>Wed, 24 Feb 2010 13:46:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-5098</guid>
		<description>[...] Pull Twitter Updates Into Flash tutorials (Part 1 and Part 2) continue to be popular! A few folks were asking how i had taken my Twitter feed and rigged it so [...]</description>
		<content:encoded><![CDATA[<p>[...] Pull Twitter Updates Into Flash tutorials (Part 1 and Part 2) continue to be popular! A few folks were asking how i had taken my Twitter feed and rigged it so [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-5097</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Wed, 24 Feb 2010 13:45:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-5097</guid>
		<description>Mitch - by popular demand, here&#039;s your tutorial:

&lt;a href=&quot;http://www.untoldentertainment.com/blog/2010/02/24/tutorial-clickify-your-twitter-feed-in-flash/&quot; rel=&quot;nofollow&quot;&gt;Tutorial: Clickify Your Twitter Feed in Flash&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>Mitch &#8211; by popular demand, here&#8217;s your tutorial:</p>
<p><a href="http://www.untoldentertainment.com/blog/2010/02/24/tutorial-clickify-your-twitter-feed-in-flash/" rel="nofollow">Tutorial: Clickify Your Twitter Feed in Flash</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mitch Rawrockin</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-5094</link>
		<dc:creator>Mitch Rawrockin</dc:creator>
		<pubDate>Wed, 24 Feb 2010 11:49:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-5094</guid>
		<description>Hello there!

First of all, supertutorial, I got mine up and running in no time and I&#039;m an AS Newbie!

Steve, I was wondering if you managed to get the links working, and if so, would you mind to share that part of code with me, that would be great..

thanks,

Mitch</description>
		<content:encoded><![CDATA[<p>Hello there!</p>
<p>First of all, supertutorial, I got mine up and running in no time and I&#8217;m an AS Newbie!</p>
<p>Steve, I was wondering if you managed to get the links working, and if so, would you mind to share that part of code with me, that would be great..</p>
<p>thanks,</p>
<p>Mitch</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Axworthy</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-5062</link>
		<dc:creator>Steve Axworthy</dc:creator>
		<pubDate>Sat, 20 Feb 2010 06:29:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-5062</guid>
		<description>Ryan,  Thanks for the details... I will see what I can do with it :)  Thanks again!</description>
		<content:encoded><![CDATA[<p>Ryan,  Thanks for the details&#8230; I will see what I can do with it :)  Thanks again!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-5050</link>
		<dc:creator>Sean</dc:creator>
		<pubDate>Thu, 18 Feb 2010 16:36:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-5050</guid>
		<description>Okay, I had everything right! That PHP file is effected by the Main.as script, and that&#039;s the only place you need to update the TwitterID. It&#039;s all working for me now.

Your cashing script was just a little too strong and my browser too dumb. It was working off an old cashed Main.as file, one that had your info in it. After a few resetting the browsers, and clearing my cashed files, it seems to be working. Excellent tutorial sir! Thanks for having this available to us.</description>
		<content:encoded><![CDATA[<p>Okay, I had everything right! That PHP file is effected by the Main.as script, and that&#8217;s the only place you need to update the TwitterID. It&#8217;s all working for me now.</p>
<p>Your cashing script was just a little too strong and my browser too dumb. It was working off an old cashed Main.as file, one that had your info in it. After a few resetting the browsers, and clearing my cashed files, it seems to be working. Excellent tutorial sir! Thanks for having this available to us.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-5048</link>
		<dc:creator>Sean</dc:creator>
		<pubDate>Thu, 18 Feb 2010 15:18:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-5048</guid>
		<description>I looked into the PHP and Main.as files, and it seems like the only place to put MY twitter user name is in the Main.as file.
______
Isn&#039;t the twitter ID in the PHP file set by that line in your Main.as file? 

The PHP file&#039;s: 
&quot;$twitterId = isset($_REQUEST[&quot;twitterId&quot;]) ? $_REQUEST[&quot;twitterId&quot;] : &#039;&#039;;
if( $twitterId == &quot;&quot; ){&quot;  

Is set by the Twitter id in the Main.as (as seen here?):

	// Put your Twitter username here.  For example, ours is &quot;Untoldent&quot; :
			myTwitterID = &quot;MyUsername&quot;; 
			
			// Put the path to your php script here:
			twitterPHPScriptPath = &quot;http://www.mydomain.com/Scripts/twitter.php&quot;;

Am I missing something? I can DM you through twitter the URLs I&#039;m using to test this from if it will help. I just don&#039;t want to post them for all to see (grin). 

Thanks in advance for the help. Great tutorial so far, just trying to figure out where my stupid mistake is.</description>
		<content:encoded><![CDATA[<p>I looked into the PHP and Main.as files, and it seems like the only place to put MY twitter user name is in the Main.as file.<br />
______<br />
Isn&#8217;t the twitter ID in the PHP file set by that line in your Main.as file? </p>
<p>The PHP file&#8217;s:<br />
&#8220;$twitterId = isset($_REQUEST["twitterId"]) ? $_REQUEST["twitterId"] : &#8221;;<br />
if( $twitterId == &#8220;&#8221; ){&#8221;  </p>
<p>Is set by the Twitter id in the Main.as (as seen here?):</p>
<p>	// Put your Twitter username here.  For example, ours is &#8220;Untoldent&#8221; :<br />
			myTwitterID = &#8220;MyUsername&#8221;; </p>
<p>			// Put the path to your php script here:<br />
			twitterPHPScriptPath = &#8220;http://www.mydomain.com/Scripts/twitter.php&#8221;;</p>
<p>Am I missing something? I can DM you through twitter the URLs I&#8217;m using to test this from if it will help. I just don&#8217;t want to post them for all to see (grin). </p>
<p>Thanks in advance for the help. Great tutorial so far, just trying to figure out where my stupid mistake is.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-5045</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Thu, 18 Feb 2010 12:40:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-5045</guid>
		<description>Sean - &quot;untoldent&quot; is set as the Twitter id in the php file.  Did you forget to change that to your own username?</description>
		<content:encoded><![CDATA[<p>Sean &#8211; &#8220;untoldent&#8221; is set as the Twitter id in the php file.  Did you forget to change that to your own username?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-5044</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Thu, 18 Feb 2010 12:35:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-5044</guid>
		<description>Sorry, Steve - i misread your question.

Short of writing a tutorial on it, here are the concepts and method calls you need:

1. Take the Tweet string and store each word in a separate index in an array.  You can do this with the Array.split() method

2. Loop through each word, and look for &quot;http://&quot; using the String.indexOf() method.  That method returns the position of the thing you&#039;re looking for in the string.  It returns -1 if the thing doesn&#039;t exist in the string.

3. If a word contains &quot;http://&quot;, replace it with &quot;&lt;a href=&#039;&quot; + theWord + &quot;&#039; rel=&quot;nofollow&quot;&gt;&quot; + theWord + &quot;&#039;&lt;/a&gt;&#039;&quot;;, which resolves to &lt;a href=&quot;someURL&quot; rel=&quot;nofollow&quot;&gt;someURL&lt;/a&gt; - your standard html hyperlink

4. As you&#039;re looping through each word and checking it for hyperlinks, concatenate it into a new string

5. myTextField.htmlText = brandNewStringWithHyperlinksInIt;
Yeah?

- Ryan</description>
		<content:encoded><![CDATA[<p>Sorry, Steve &#8211; i misread your question.</p>
<p>Short of writing a tutorial on it, here are the concepts and method calls you need:</p>
<p>1. Take the Tweet string and store each word in a separate index in an array.  You can do this with the Array.split() method</p>
<p>2. Loop through each word, and look for &#8220;http://&#8221; using the String.indexOf() method.  That method returns the position of the thing you&#8217;re looking for in the string.  It returns -1 if the thing doesn&#8217;t exist in the string.</p>
<p>3. If a word contains &#8220;http://&#8221;, replace it with &#8220;<a href='" + theWord + "' rel="nofollow">&#8221; + theWord + &#8220;&#8216;</a>&#8216;&#8221;;, which resolves to <a href="someURL" rel="nofollow">someURL</a> &#8211; your standard html hyperlink</p>
<p>4. As you&#8217;re looping through each word and checking it for hyperlinks, concatenate it into a new string</p>
<p>5. myTextField.htmlText = brandNewStringWithHyperlinksInIt;<br />
Yeah?</p>
<p>- Ryan</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-5042</link>
		<dc:creator>Sean</dc:creator>
		<pubDate>Thu, 18 Feb 2010 05:57:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-5042</guid>
		<description>Alright, I think I&#039;m almost there because my SWF file is pulling info from twitter. Only problem is it&#039;s YOUR FEED! 

In the Main.as file I have changed the &quot;myTwitterID = &quot;XXXXXXX&quot; to my XXXXXXX and pointed it to the correct PHP on my domain in the &quot;twitterPHPScriptPath = &quot;http://www.mydomain.com/phpfile.php&quot; line, but it keeps showing your feed. I must be overlooking something small. Let me know if there is someplace else I need to change a parameter. Hope I&#039;m just missing something small. I&#039;m really just learning this as I go.</description>
		<content:encoded><![CDATA[<p>Alright, I think I&#8217;m almost there because my SWF file is pulling info from twitter. Only problem is it&#8217;s YOUR FEED! </p>
<p>In the Main.as file I have changed the &#8220;myTwitterID = &#8220;XXXXXXX&#8221; to my XXXXXXX and pointed it to the correct PHP on my domain in the &#8220;twitterPHPScriptPath = &#8220;http://www.mydomain.com/phpfile.php&#8221; line, but it keeps showing your feed. I must be overlooking something small. Let me know if there is someplace else I need to change a parameter. Hope I&#8217;m just missing something small. I&#8217;m really just learning this as I go.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Axworthy</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-5041</link>
		<dc:creator>Steve Axworthy</dc:creator>
		<pubDate>Wed, 17 Feb 2010 19:29:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-5041</guid>
		<description>Ryan,  I am asking for details on making the tweet links actual links... I assume that would mean picking through the info from the tweeter rss feed to create the links.. hope I am explaining that right.

Thanks!</description>
		<content:encoded><![CDATA[<p>Ryan,  I am asking for details on making the tweet links actual links&#8230; I assume that would mean picking through the info from the tweeter rss feed to create the links.. hope I am explaining that right.</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-5039</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Wed, 17 Feb 2010 16:04:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-5039</guid>
		<description>Steve - are you asking for a tutorial on how to pick through the information you get from the Twitter RSS feed and do stuff with it?</description>
		<content:encoded><![CDATA[<p>Steve &#8211; are you asking for a tutorial on how to pick through the information you get from the Twitter RSS feed and do stuff with it?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Axworthy</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-5037</link>
		<dc:creator>Steve Axworthy</dc:creator>
		<pubDate>Wed, 17 Feb 2010 05:45:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-5037</guid>
		<description>Hey Ryan.. awesome work and great tutorial... I have gone through the comments and have seen the questions and replies on making the tweet links actual links.. and I understand that you seach for the http:// and then make that a link until you get to the next space in the AS3 code... but I am not at ll familliar on how to code that... If you could provide code or a link to a VERY beginner tutorial or samples that a &#039;dummy&#039; may be able to get.. I would greatly appreciate it!  Everything is working great in my test.. just need the links ;)
Thanks!</description>
		<content:encoded><![CDATA[<p>Hey Ryan.. awesome work and great tutorial&#8230; I have gone through the comments and have seen the questions and replies on making the tweet links actual links.. and I understand that you seach for the http:// and then make that a link until you get to the next space in the AS3 code&#8230; but I am not at ll familliar on how to code that&#8230; If you could provide code or a link to a VERY beginner tutorial or samples that a &#8216;dummy&#8217; may be able to get.. I would greatly appreciate it!  Everything is working great in my test.. just need the links ;)<br />
Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Maurer</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-4907</link>
		<dc:creator>Mike Maurer</dc:creator>
		<pubDate>Thu, 07 Jan 2010 22:55:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-4907</guid>
		<description>How did you guys get the url links from the tweet to actually be working links on the untold entertainment site?</description>
		<content:encoded><![CDATA[<p>How did you guys get the url links from the tweet to actually be working links on the untold entertainment site?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brandon Kitajchuk</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-4890</link>
		<dc:creator>Brandon Kitajchuk</dc:creator>
		<pubDate>Mon, 04 Jan 2010 20:56:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-4890</guid>
		<description>Ryan - Thanks, found helpful info here: http://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html and fixed the issue!</description>
		<content:encoded><![CDATA[<p>Ryan &#8211; Thanks, found helpful info here: <a href="http://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html" rel="nofollow">http://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html</a> and fixed the issue!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: West</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-4881</link>
		<dc:creator>West</dc:creator>
		<pubDate>Fri, 01 Jan 2010 02:00:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-4881</guid>
		<description>Great tutorial. Haven&#039;t found anything else like this on the web yet.

Only had two problems getting it to work: 1) getting my server to cooperate (fopen stuff) and 2) figuring out that the php code is the ONLY thing that should be in the php file.

I am, however, having problems implementing a stylesheet for the text. I want to pull in multiple tweets with the timestamps below each one (which I can do without a hitch) and have the timestamp be a smaller font and different color. I tried to use a css file loaded to a styleSheet and applied to the textbox, then use html code in between each node of the xml to create this effect... like this:

    twitter_txt.htmlText = &quot;&quot; + twitterXML.status.text[0] + &quot;&quot; + twitterXML.status.created_at[0] + &quot;&quot;;

It just isn&#039;t working.  works though.
Any ideas anyone?</description>
		<content:encoded><![CDATA[<p>Great tutorial. Haven&#8217;t found anything else like this on the web yet.</p>
<p>Only had two problems getting it to work: 1) getting my server to cooperate (fopen stuff) and 2) figuring out that the php code is the ONLY thing that should be in the php file.</p>
<p>I am, however, having problems implementing a stylesheet for the text. I want to pull in multiple tweets with the timestamps below each one (which I can do without a hitch) and have the timestamp be a smaller font and different color. I tried to use a css file loaded to a styleSheet and applied to the textbox, then use html code in between each node of the xml to create this effect&#8230; like this:</p>
<p>    twitter_txt.htmlText = &#8220;&#8221; + twitterXML.status.text[0] + &#8220;&#8221; + twitterXML.status.created_at[0] + &#8220;&#8221;;</p>
<p>It just isn&#8217;t working.  works though.<br />
Any ideas anyone?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-4847</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Wed, 23 Dec 2009 14:34:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-4847</guid>
		<description>Brandon - i&#039;m not a pro at this, but my understanding is that Flash treats the www address and the non-www address as two different domains, and refuses to pull data from one domain into another.  Just Google Flash cross-domain policy.</description>
		<content:encoded><![CDATA[<p>Brandon &#8211; i&#8217;m not a pro at this, but my understanding is that Flash treats the www address and the non-www address as two different domains, and refuses to pull data from one domain into another.  Just Google Flash cross-domain policy.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brandon Kitajchuk</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-4840</link>
		<dc:creator>Brandon Kitajchuk</dc:creator>
		<pubDate>Tue, 22 Dec 2009 06:33:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-4840</guid>
		<description>I have a question for you:

When I have the url in  as http://caitlincwilliams.com the twitter feed doesn&#039;t pull in, but when I have it with the &quot;www&quot; in the url it does. Any thoughts on this?</description>
		<content:encoded><![CDATA[<p>I have a question for you:</p>
<p>When I have the url in  as <a href="http://caitlincwilliams.com" rel="nofollow">http://caitlincwilliams.com</a> the twitter feed doesn&#8217;t pull in, but when I have it with the &#8220;www&#8221; in the url it does. Any thoughts on this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brandon Kitajchuk</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-4839</link>
		<dc:creator>Brandon Kitajchuk</dc:creator>
		<pubDate>Tue, 22 Dec 2009 06:28:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-4839</guid>
		<description>Hey, thanks a lot man! After a few hours of pulling my hair out between the first tut and this one i got it with this cache version! This is the site: http://www.caitlincwilliams.com/

Thanks for making the twitter happen! :)</description>
		<content:encoded><![CDATA[<p>Hey, thanks a lot man! After a few hours of pulling my hair out between the first tut and this one i got it with this cache version! This is the site: <a href="http://www.caitlincwilliams.com/" rel="nofollow">http://www.caitlincwilliams.com/</a></p>
<p>Thanks for making the twitter happen! :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tarquin oblongatta</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-4789</link>
		<dc:creator>Tarquin oblongatta</dc:creator>
		<pubDate>Mon, 07 Dec 2009 06:28:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-4789</guid>
		<description>If you are still having trouble with this one. Clean out your shared object folders eg:

information found here http://addiator.blogspot.com/2008/03/flash-cookies-finding-and-deleting.html

Was working fine and then not ... Cleared out my shared objects all is well. Going to look into Joe B&#039;s method.</description>
		<content:encoded><![CDATA[<p>If you are still having trouble with this one. Clean out your shared object folders eg:</p>
<p>information found here <a href="http://addiator.blogspot.com/2008/03/flash-cookies-finding-and-deleting.html" rel="nofollow">http://addiator.blogspot.com/2008/03/flash-cookies-finding-and-deleting.html</a></p>
<p>Was working fine and then not &#8230; Cleared out my shared objects all is well. Going to look into Joe B&#8217;s method.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-4588</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Sat, 07 Nov 2009 12:58:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-4588</guid>
		<description>Christian - do a quick check to make sure everything&#039;s rigged up properly by putting a trace() command in Main, for starters.</description>
		<content:encoded><![CDATA[<p>Christian &#8211; do a quick check to make sure everything&#8217;s rigged up properly by putting a trace() command in Main, for starters.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christian</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-4587</link>
		<dc:creator>Christian</dc:creator>
		<pubDate>Sat, 07 Nov 2009 12:37:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-4587</guid>
		<description>I have tried to set up the script really quickly and changed the required files but am not getting the twitter to load on my page. 

http://www.christianpompa.com/index2.html . the php &amp; .as file is on there named twiter.php &amp; Main.as in no directory, just right after domain for u quick testing. Can you check this out and give me a quick rundown of whats wrong with that. I checked throughout all the comments and couldn&#039;t find anything. I also set the AS3 setting on the flash to link to Main.as but still no go on it. Thanks</description>
		<content:encoded><![CDATA[<p>I have tried to set up the script really quickly and changed the required files but am not getting the twitter to load on my page. </p>
<p><a href="http://www.christianpompa.com/index2.html" rel="nofollow">http://www.christianpompa.com/index2.html</a> . the php &amp; .as file is on there named twiter.php &amp; Main.as in no directory, just right after domain for u quick testing. Can you check this out and give me a quick rundown of whats wrong with that. I checked throughout all the comments and couldn&#8217;t find anything. I also set the AS3 setting on the flash to link to Main.as but still no go on it. Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-4428</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Mon, 19 Oct 2009 14:30:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-4428</guid>
		<description>NP, Joe B.  Truth be told, we&#039;re actually using a method similar to the one you&#039;ve described here.  We&#039;ve set a cron job so that every x minutes, our server grabs the Twitter data and stores it. Visitors to our site actaully hit a php page that returns the cached data.  This way, you get around the server call limit because it&#039;s only our server that constantly checks the feed.  Technology ftw!  Thanks for sharing your solution.</description>
		<content:encoded><![CDATA[<p>NP, Joe B.  Truth be told, we&#8217;re actually using a method similar to the one you&#8217;ve described here.  We&#8217;ve set a cron job so that every x minutes, our server grabs the Twitter data and stores it. Visitors to our site actaully hit a php page that returns the cached data.  This way, you get around the server call limit because it&#8217;s only our server that constantly checks the feed.  Technology ftw!  Thanks for sharing your solution.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: joe B</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-4424</link>
		<dc:creator>joe B</dc:creator>
		<pubDate>Sun, 18 Oct 2009 06:38:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-4424</guid>
		<description>nice!

Thanks much for this tutorial - i found it usefull and was able to get the first round working no problem - good work! 

But a few questions regarding this post ...  after read it seems like this method wouldn&#039;t really work if you were getting a LOt of hits from &#039;different&#039; users -  is there any reason not to save the xml  file out from the php and call to that? (then maybe add some logic to decide which xml file to read)

im doing something like this for my solution:

echo $file;

$filename = $twitterId.&#039;output.xml&#039;;
$h = fopen($filename, &#039;w&#039;);
fwrite($h, $file);
fclose($h);	

do get me wrong... I do like the shared object approach as well</description>
		<content:encoded><![CDATA[<p>nice!</p>
<p>Thanks much for this tutorial &#8211; i found it usefull and was able to get the first round working no problem &#8211; good work! </p>
<p>But a few questions regarding this post &#8230;  after read it seems like this method wouldn&#8217;t really work if you were getting a LOt of hits from &#8216;different&#8217; users &#8211;  is there any reason not to save the xml  file out from the php and call to that? (then maybe add some logic to decide which xml file to read)</p>
<p>im doing something like this for my solution:</p>
<p>echo $file;</p>
<p>$filename = $twitterId.&#8217;output.xml&#8217;;<br />
$h = fopen($filename, &#8216;w&#8217;);<br />
fwrite($h, $file);<br />
fclose($h);	</p>
<p>do get me wrong&#8230; I do like the shared object approach as well</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ujjwal Agarwal</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-3333</link>
		<dc:creator>Ujjwal Agarwal</dc:creator>
		<pubDate>Wed, 17 Jun 2009 10:16:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-3333</guid>
		<description>Maaan..... damn nice ... its courtesy people like you that this world of internet is surviving .. damn damn guud .. both the technology and the motive heh ..</description>
		<content:encoded><![CDATA[<p>Maaan&#8230;.. damn nice &#8230; its courtesy people like you that this world of internet is surviving .. damn damn guud .. both the technology and the motive heh ..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-3275</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Wed, 03 Jun 2009 15:55:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-3275</guid>
		<description>1. Never use scenes
2. The Main.as file is nearly exactly the same thing as having code in the first frame of your movie.  So if you write a method (function) in there that populates the text field, you can just call that method when you hit frame 66.   So if the method is called populateTextField, and inside you say twitter_txt.text = &quot;whatever&quot;, put a frame script on frame 66 and call the method - populateTextField()
3. That all being said, there are some best practices you should learn going forward.  Never use frame scripts.  You wind up with what&#039;s called &quot;spaghetti code&quot;, where you have little snippets buried all around your movie.  And, unfortunately, stop using the timeline.  AS3 has rendered the timeline useless to the point where if you try to use it and harmonize it with your AS3 code, you&#039;re in for a world of hurt.  This is a bitter pill to swallow, since i&#039;m a big fan of timelines and nested clips, but the eggheads who have held Flash hostage for the past few years have locked us out.</description>
		<content:encoded><![CDATA[<p>1. Never use scenes<br />
2. The Main.as file is nearly exactly the same thing as having code in the first frame of your movie.  So if you write a method (function) in there that populates the text field, you can just call that method when you hit frame 66.   So if the method is called populateTextField, and inside you say twitter_txt.text = &#8220;whatever&#8221;, put a frame script on frame 66 and call the method &#8211; populateTextField()<br />
3. That all being said, there are some best practices you should learn going forward.  Never use frame scripts.  You wind up with what&#8217;s called &#8220;spaghetti code&#8221;, where you have little snippets buried all around your movie.  And, unfortunately, stop using the timeline.  AS3 has rendered the timeline useless to the point where if you try to use it and harmonize it with your AS3 code, you&#8217;re in for a world of hurt.  This is a bitter pill to swallow, since i&#8217;m a big fan of timelines and nested clips, but the eggheads who have held Flash hostage for the past few years have locked us out.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Travis</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-3274</link>
		<dc:creator>Travis</dc:creator>
		<pubDate>Wed, 03 Jun 2009 15:34:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-3274</guid>
		<description>That was the easy fix, using specials.twitter_txt.  Now I am down to what seems to be the last issue.  Like you said, my twitter_txt box sits with the loading text because the call to the Main.as file is at the beginning of the movie.  Is there a way to call it again, at say, frame 66 in order to populate that text field?

If not, I was thinking that i could make the &#039;specials&#039; movie clips visibility equal to false at the beginning in order to populate the text box, but once it switches scenes I lose the text.  Is there a way to maybe set the contents of the textbox to a global variable of a sort and then repopulate the textbox with those contents once i get to frame 66 (scene 2)?

Sorry for all the questions, I am getting very close and I really appreciate the help.</description>
		<content:encoded><![CDATA[<p>That was the easy fix, using specials.twitter_txt.  Now I am down to what seems to be the last issue.  Like you said, my twitter_txt box sits with the loading text because the call to the Main.as file is at the beginning of the movie.  Is there a way to call it again, at say, frame 66 in order to populate that text field?</p>
<p>If not, I was thinking that i could make the &#8216;specials&#8217; movie clips visibility equal to false at the beginning in order to populate the text box, but once it switches scenes I lose the text.  Is there a way to maybe set the contents of the textbox to a global variable of a sort and then repopulate the textbox with those contents once i get to frame 66 (scene 2)?</p>
<p>Sorry for all the questions, I am getting very close and I really appreciate the help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-3273</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Wed, 03 Jun 2009 14:47:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-3273</guid>
		<description>Two problems here: 1. If your text field is on frame 66, and the code is being executed on frame 1, the code won&#039;t find the text field.  2. If your text field is nested inside another clip, you need to use dot syntax to refer to it.  So if it&#039;s in a clip called textBoxHolder on the main timeline, to access it you need to say textBoxHolder.twitter_txt.

There&#039;s a third possible problem - AS3 is junk for dealing with timeline stuff, and especially nested clips on the timeline.  Most often, the code executes before the screen is drawn and the clips become accessible.  So watch out.</description>
		<content:encoded><![CDATA[<p>Two problems here: 1. If your text field is on frame 66, and the code is being executed on frame 1, the code won&#8217;t find the text field.  2. If your text field is nested inside another clip, you need to use dot syntax to refer to it.  So if it&#8217;s in a clip called textBoxHolder on the main timeline, to access it you need to say textBoxHolder.twitter_txt.</p>
<p>There&#8217;s a third possible problem &#8211; AS3 is junk for dealing with timeline stuff, and especially nested clips on the timeline.  Most often, the code executes before the screen is drawn and the clips become accessible.  So watch out.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Travis</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-3272</link>
		<dc:creator>Travis</dc:creator>
		<pubDate>Wed, 03 Jun 2009 14:06:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-3272</guid>
		<description>Ryan, I was able to get it all working...mostly.  Your code works perfect however when I add this code into my site, i then recieve an error:

1120: Access of undefined property twitter_txt.

my twitter_txt box is in scene 1, Frame 66, and within a movie clip symbol.  Am I not calling it correctly from the Main.as file?  Any help would be appreciated, once again.</description>
		<content:encoded><![CDATA[<p>Ryan, I was able to get it all working&#8230;mostly.  Your code works perfect however when I add this code into my site, i then recieve an error:</p>
<p>1120: Access of undefined property twitter_txt.</p>
<p>my twitter_txt box is in scene 1, Frame 66, and within a movie clip symbol.  Am I not calling it correctly from the Main.as file?  Any help would be appreciated, once again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-3254</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Fri, 29 May 2009 18:34:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-3254</guid>
		<description>Travis - thanks for pointing out that the code was different between the blog post and the zip file.  The post has the correct version.  Hitting Twitter directly from Flash isn&#039;t going to work.

Did you read the comments from the others in both tutorials? The problem you have is likely a security sandbox issue.  Make sure that the swf is sitting in the same domain as the php.  Even a missing &quot;www&quot; will cause an error.</description>
		<content:encoded><![CDATA[<p>Travis &#8211; thanks for pointing out that the code was different between the blog post and the zip file.  The post has the correct version.  Hitting Twitter directly from Flash isn&#8217;t going to work.</p>
<p>Did you read the comments from the others in both tutorials? The problem you have is likely a security sandbox issue.  Make sure that the swf is sitting in the same domain as the php.  Even a missing &#8220;www&#8221; will cause an error.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Travis</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-3253</link>
		<dc:creator>Travis</dc:creator>
		<pubDate>Fri, 29 May 2009 18:13:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-3253</guid>
		<description>You are right, it must be something small and stupid.  And I think it is with the PHP call in the AS script.

I tryed using that application but with no avail.  The funny thing is that when I use the code from tutorial 1 (from the website not the source file (the code is different between these two)) it populates twitter in the flash file on my local computer but not on my web server.  I am pretty sure this is because the code listed on tutorial 1 makes no call to a PHP file.  When I use the code in tutorial 1 from the source file (the one that makes a call to the PHP file) it no longer works.

Since I was able to make a call to my PHP file and get a return through the web browser, then this tells me that there must be a problem with the call from the AS file to the PHP file.  However, I literally copied and pasted the same PHP link that works in my browser to the AS file but with no avail, either.

I realize you are probably busy with other things, but if you get a second to take a look i have uploaded the files to:  www.parisisrestaurant.com/files/tparisi.zip

-Travis</description>
		<content:encoded><![CDATA[<p>You are right, it must be something small and stupid.  And I think it is with the PHP call in the AS script.</p>
<p>I tryed using that application but with no avail.  The funny thing is that when I use the code from tutorial 1 (from the website not the source file (the code is different between these two)) it populates twitter in the flash file on my local computer but not on my web server.  I am pretty sure this is because the code listed on tutorial 1 makes no call to a PHP file.  When I use the code in tutorial 1 from the source file (the one that makes a call to the PHP file) it no longer works.</p>
<p>Since I was able to make a call to my PHP file and get a return through the web browser, then this tells me that there must be a problem with the call from the AS file to the PHP file.  However, I literally copied and pasted the same PHP link that works in my browser to the AS file but with no avail, either.</p>
<p>I realize you are probably busy with other things, but if you get a second to take a look i have uploaded the files to:  <a href="http://www.parisisrestaurant.com/files/tparisi.zip" rel="nofollow">http://www.parisisrestaurant.com/files/tparisi.zip</a></p>
<p>-Travis</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-3252</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Fri, 29 May 2009 17:28:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-3252</guid>
		<description>The problem is likely a) little and b) dumb. Is your Flash Player updated to the latest version?  Consider using DeMonster Debugger to fire out trace actions that&#039;ll tell you what&#039;s going on with swfs playing in the browser:

http://demonsterdebugger.com/</description>
		<content:encoded><![CDATA[<p>The problem is likely a) little and b) dumb. Is your Flash Player updated to the latest version?  Consider using DeMonster Debugger to fire out trace actions that&#8217;ll tell you what&#8217;s going on with swfs playing in the browser:</p>
<p><a href="http://demonsterdebugger.com/" rel="nofollow">http://demonsterdebugger.com/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Travis</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-3251</link>
		<dc:creator>Travis</dc:creator>
		<pubDate>Fri, 29 May 2009 17:01:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-3251</guid>
		<description>Ryan, I have been messing with this for sometime now and am still stumped!

My Flash file just sits at &quot;Loading...&quot;

I have tested that the PHP file is working by directing my web browser to:  http://www.parisisrestaurant.com/tscriptphp/parisitwitter.php?twitterId=TrattoriaParisi

This returns a twitter feed, so it must not be my PHP file.

I have edited the code to include my ID: var myTwitterID:String = &quot;TrattoriaParisi&quot;;
And edited to include the PHP location: var twitterPHPScriptPath:String = &quot;http://www.parisisrestaurant.com/tscriptphp/parisitwitter.php&quot;;

I save the file and upload them to the directory and it just sits there.... what am I doing wrong?!?! Please help!

-Travis</description>
		<content:encoded><![CDATA[<p>Ryan, I have been messing with this for sometime now and am still stumped!</p>
<p>My Flash file just sits at &#8220;Loading&#8230;&#8221;</p>
<p>I have tested that the PHP file is working by directing my web browser to:  <a href="http://www.parisisrestaurant.com/tscriptphp/parisitwitter.php?twitterId=TrattoriaParisi" rel="nofollow">http://www.parisisrestaurant.com/tscriptphp/parisitwitter.php?twitterId=TrattoriaParisi</a></p>
<p>This returns a twitter feed, so it must not be my PHP file.</p>
<p>I have edited the code to include my ID: var myTwitterID:String = &#8220;TrattoriaParisi&#8221;;<br />
And edited to include the PHP location: var twitterPHPScriptPath:String = &#8220;http://www.parisisrestaurant.com/tscriptphp/parisitwitter.php&#8221;;</p>
<p>I save the file and upload them to the directory and it just sits there&#8230;. what am I doing wrong?!?! Please help!</p>
<p>-Travis</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PB</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-3232</link>
		<dc:creator>PB</dc:creator>
		<pubDate>Thu, 28 May 2009 17:25:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-3232</guid>
		<description>thats great that you are talking about the twitter api,a good example of searching with the twitter api is on twiogle.com because you can search on twitter and google at the same time.</description>
		<content:encoded><![CDATA[<p>thats great that you are talking about the twitter api,a good example of searching with the twitter api is on twiogle.com because you can search on twitter and google at the same time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-3231</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Thu, 28 May 2009 15:01:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-3231</guid>
		<description>No suggestions!  But it&#039;s a good thing we&#039;re on the Internatz.  Anyone else?</description>
		<content:encoded><![CDATA[<p>No suggestions!  But it&#8217;s a good thing we&#8217;re on the Internatz.  Anyone else?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dan</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-3229</link>
		<dc:creator>dan</dc:creator>
		<pubDate>Thu, 28 May 2009 13:53:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-3229</guid>
		<description>that is no fun for you, no fun indeed. well, apparently i did have the located in the right place and with the right path in flash, but i get this dandy message:

TypeError: Error #1088: The markup in the document following the root element must be well-formed.

apparently me and flash disagree on our definition of &#039;well-formed&#039; and i pulled it from the first tutorial.
any suggestions?</description>
		<content:encoded><![CDATA[<p>that is no fun for you, no fun indeed. well, apparently i did have the located in the right place and with the right path in flash, but i get this dandy message:</p>
<p>TypeError: Error #1088: The markup in the document following the root element must be well-formed.</p>
<p>apparently me and flash disagree on our definition of &#8216;well-formed&#8217; and i pulled it from the first tutorial.<br />
any suggestions?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-3228</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Wed, 27 May 2009 16:10:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-3228</guid>
		<description>The trick there is that if i tell you the path to my php file, anyone can hit my script with their info, and that&#039;s no fun for us.  

It&#039;s not too tough.  In your ftp program, create a new folder.  Let&#039;s say &quot;scripts&quot;.  So the path to that folder is http://www.yourdomain.com/scripts.   Then, create your php file and drop it into that folder.  Now the path to the php file is http://www.yourdomain.com/scripts/myPHPfile.php.   That&#039;s not too tricky, is it?

Just make sure that the swf file that calls the php is also within the directory structure at http://www.yourdomain.com, or you&#039;ll get security sandbox errors like the other folks here.</description>
		<content:encoded><![CDATA[<p>The trick there is that if i tell you the path to my php file, anyone can hit my script with their info, and that&#8217;s no fun for us.  </p>
<p>It&#8217;s not too tough.  In your ftp program, create a new folder.  Let&#8217;s say &#8220;scripts&#8221;.  So the path to that folder is <a href="http://www.yourdomain.com/scripts" rel="nofollow">http://www.yourdomain.com/scripts</a>.   Then, create your php file and drop it into that folder.  Now the path to the php file is <a href="http://www.yourdomain.com/scripts/myPHPfile.php" rel="nofollow">http://www.yourdomain.com/scripts/myPHPfile.php</a>.   That&#8217;s not too tricky, is it?</p>
<p>Just make sure that the swf file that calls the php is also within the directory structure at <a href="http://www.yourdomain.com" rel="nofollow">http://www.yourdomain.com</a>, or you&#8217;ll get security sandbox errors like the other folks here.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dan</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-3224</link>
		<dc:creator>dan</dc:creator>
		<pubDate>Tue, 26 May 2009 14:29:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-3224</guid>
		<description>i can&#039;t for the life of me link the php up to the flash. i&#039;m learning as3 but have never done anything with flash and php. i&#039;m sure i&#039;m just missing something really easy with how to create the php file or the file path in flash, but either way i&#039;m stuck. is it possible to see yours was set up with the php before you put in the place holders? thanks in advance!</description>
		<content:encoded><![CDATA[<p>i can&#8217;t for the life of me link the php up to the flash. i&#8217;m learning as3 but have never done anything with flash and php. i&#8217;m sure i&#8217;m just missing something really easy with how to create the php file or the file path in flash, but either way i&#8217;m stuck. is it possible to see yours was set up with the php before you put in the place holders? thanks in advance!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-3199</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Fri, 15 May 2009 13:28:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-3199</guid>
		<description>Thanks Michael!   You&#039;re right - no explanation from Twitter.  Just a link to optimization suggestions.  i honestly can&#039;t say i blame them, though.  But in ten years, we&#039;ll be on a Trivial Pursuit card:  &quot;Which monolithic entertainment company did Twitter once reject for whitelisting?&quot;

Hahahaha.  Delusions of grandeur.</description>
		<content:encoded><![CDATA[<p>Thanks Michael!   You&#8217;re right &#8211; no explanation from Twitter.  Just a link to optimization suggestions.  i honestly can&#8217;t say i blame them, though.  But in ten years, we&#8217;ll be on a Trivial Pursuit card:  &#8220;Which monolithic entertainment company did Twitter once reject for whitelisting?&#8221;</p>
<p>Hahahaha.  Delusions of grandeur.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://www.untoldentertainment.com/blog/2009/05/14/tutorial-twitter-updates-in-flash-part-2/comment-page-1/#comment-3198</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Fri, 15 May 2009 10:17:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.untoldentertainment.com/blog/?p=1290#comment-3198</guid>
		<description>Thanks for the namedrop! That&#039;s harsh of Twitter to just leave a blank space for the reason (or did you just cut that out?)

Anyway, brilliant tutorial. I love your idea of storing all that info in the sha--Flash cookie, and all the benefits that come with it. I&#039;d never thought of that.</description>
		<content:encoded><![CDATA[<p>Thanks for the namedrop! That&#8217;s harsh of Twitter to just leave a blank space for the reason (or did you just cut that out?)</p>
<p>Anyway, brilliant tutorial. I love your idea of storing all that info in the sha&#8211;Flash cookie, and all the benefits that come with it. I&#8217;d never thought of that.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

