<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Burned Out Hippy &#187; Classes</title>
	<atom:link href="http://www.burnedouthippy.com/category/classes/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.burnedouthippy.com</link>
	<description>~ Hugging Flash into submission ~</description>
	<lastBuildDate>Sun, 13 Jun 2010 13:17:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Actionscript 3 getURL() class</title>
		<link>http://www.burnedouthippy.com/2010/02/actionscript-3-geturl-class/</link>
		<comments>http://www.burnedouthippy.com/2010/02/actionscript-3-geturl-class/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 17:48:59 +0000</pubDate>
		<dc:creator>The Hippy</dc:creator>
				<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[Classes]]></category>
		<category><![CDATA[Downloads]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[loader]]></category>

		<guid isPermaLink="false">http://www.burnedouthippy.com/?p=262</guid>
		<description><![CDATA[I don&#8217;t know about you, but one of the things that I miss most about AS2 is the simplicity to use&#8230; getURL("http:www.mysite.com", "_blank") &#8230;to launch a web address. Nowadays you have to set up a URLRequest and then use the navigateToURL command, like this: var link:URLRequest = new URLRequest("http://www.mysite.com"); navigateToURL(link, "_blank"); It&#8217;s straightforward enough, but [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t know about you, but one of the things that I miss most about AS2 is the simplicity to use&#8230;</p>
<p><code>getURL("http:www.mysite.com", "_blank")</code></p>
<p>&#8230;to launch a web address.</p>
<p><span id="more-262"></span>Nowadays you have to set up a URLRequest and then use the navigateToURL command, like this:</p>
<p><code>var link:URLRequest = new URLRequest("http://www.mysite.com");<br />
navigateToURL(link, "_blank");</code></p>
<p>It&#8217;s straightforward enough, but it&#8217;s long winded and a bit annoying when you&#8217;re used to such a short command. So, I&#8217;ve gone ahead and created myself a <a href="http://www.burnedouthippy.com/downloads/geturl/geturl.zip">getURL class which you&#8217;re welcome to download and use</a> if it bugs you  too.</p>
<p>Once installed in your AS directory, all you have to type is&#8230;</p>
<p><code>new getURL("http://www.mysite.com");</code></p>
<p>&#8230;to launch a site. Don&#8217;t forget you&#8217;ll also need to import the class if your preferred coding application doesn&#8217;t immediately spot it.</p>
<p>Unlike the AS2 original, I&#8217;ve set it up so that the target is automatically &#8220;_blank&#8221;&#8230;this is simply because it&#8217;s my preference when launching URLs from a button (as they tend to be external websites). If you wish to change this, simply type something like&#8230;</p>
<p><code>new getURL("http://www.mysite.com", "_self");</code></p>
<p>&#8230;or replace &#8220;_self&#8221; with whatever your preferred target is.</p>
<p>Enjoy <img src='http://www.burnedouthippy.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.burnedouthippy.com/2010/02/actionscript-3-geturl-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tweeter v1.0 &#8211; simplifying Twitter and Actionscript</title>
		<link>http://www.burnedouthippy.com/2009/08/tweeter-v1-0-simplifying-twitter-and-actionscript/</link>
		<comments>http://www.burnedouthippy.com/2009/08/tweeter-v1-0-simplifying-twitter-and-actionscript/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 14:46:30 +0000</pubDate>
		<dc:creator>The Hippy</dc:creator>
				<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[Classes]]></category>
		<category><![CDATA[Downloads]]></category>
		<category><![CDATA[Twitter API]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[stylesheet]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.burnedouthippy.com/?p=63</guid>
		<description><![CDATA[If you want to add a Twitter feed to your flash website, currently the best way to do it is to pay a visit to Matt Pearson&#8217;s (Zenbullets) Twitter API explanation and buckle down to the code. However if like me you are finding your clients increasingly requesting Twitter feeds in their sites, perhaps you&#8217;ll [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.burnedouthippy.com/images/tweeter.jpg" alt="Tweeter" /></p>
<p>If you want to add a Twitter feed to your flash website, currently the best way to do it is to pay a visit to <a href="http://actionscripter.co.uk/blog/?page_id=262" target="_blank">Matt Pearson&#8217;s (Zenbullets) Twitter API explanation</a> and buckle down to the code. However if like me you are finding your clients increasingly requesting Twitter feeds in their sites, perhaps you&#8217;ll appreciate my new Tweeter class for ease of re-use.</p>
<p>Try it out:</p>
<p>
<object width="458" height="200">
<param name="movie" value="http://www.burnedouthippy.com/examples/tweeter/TwitterClass.swf"></param>
<param name="quality" value="high"></param>
<param name="wmode" value="window"></param>
<param name="menu" value="false"></param>
<param name="bgcolor" value="#FFFFFF"></param>
<embed type="application/x-shockwave-flash" width="458" height="200" src="http://www.burnedouthippy.com/examples/tweeter/TwitterClass.swf" quality="high" bgcolor="#FFFFFF" wmode="window" menu="false" ></embed>
</object>
</p>
<p>It&#8217;s based around Matt&#8217;s explanations and centres on drawing a single tweet from a single user (using the API&#8217;s &#8220;status&#8221; call). All I&#8217;ve done in my clumsy ham-fisted way is to simplify it for anyone who either doesn&#8217;t have the time to learn it or simply can&#8217;t be bothered. Now all you have to do is use something like the following code for it be up and running in seconds&#8230;</p>
<p><span id="more-63"></span></p>
<p><code>var t:Tweeter = new Tweeter();<br />
t.proxy = "http://www.yourdomain.com";<br />
t.user = "bbcbreaking";<br />
t.getTweet();<br />
addChild(t);</code></p>
<p>I&#8217;ve added a few other customisable options (which I will explain in a moment), but something like the above will have it working for you in seconds. Here&#8217;s a quick explanation of the above before I show you what else you can do with it&#8230;</p>
<p><strong>t.proxy</strong><br />
As Zenbullets explains in his <a href="http://actionscripter.co.uk/blog/?page_id=262" target="_blank">blog post</a>, Flash and Twitter have cross-domain issues. So in order to bypass this you need to run a simple PHP file. I&#8217;ve included this file with the rest of the example files. All you have to do is upload it to your server and point t.proxy at the file&#8217;s location, as in the example above. Please ensure that you add &#8220;http://&#8221; at the beginning and you DON&#8217;T put a &#8220;/&#8221; at the end &#8211; Tweeter will do the rest. <em>Please note: Tweeter will not work without this file</em>.</p>
<p><strong>t.user</strong><br />
This is simply the user name of the Twitter feed you want to pull. eg. if your Twitter page is &#8220;http://www.twitter.com/flashguru20&#8243;, the user name is &#8220;flashguru20&#8243;. If you forget to add this line it will default to The Burned Out Hippy&#8217;s Twitter feed.</p>
<p><strong>t.getTweet()</strong><br />
When you&#8217;ve finished mucking around with the style (I&#8217;ll get to that in a minute), use this line to trigger Tweeter into action.</p>
<p>There are also a couple of other bits and bobs that you should know about that will allow you to style the tweet to your heart&#8217;s content. These are as follows (and should be added <em>before</em> the getTweet trigger):</p>
<p><strong>t.picture = false</strong><br />
This will turn off the user&#8217;s profile picture. Currently the picture aligns to the left of the tweet. In the future I may adapt this so as to allow it&#8217;s location to be top, bottom, left and right &#8211; but as I don&#8217;t need to yet, I haven&#8217;t. So if the user pic isn&#8217;t fitting in with your styling of the text or simply isn&#8217;t to your liking, use the above line to turn it off.</p>
<p><strong>t.loader</strong><br />
I imagine this is a bit naughty, but as I&#8217;m not fully AS3 conversant yet this is the only way I could achieve what I wanted to achieve. &#8220;loader&#8221; is quite simply the main URLRequest that calls the proxy PHP file to get the tweet. I&#8217;ve left it public in order for you to be able to add your own event listeners to it &#8211; so if you want to add a loading animation you can. I may close this back to private at a later date if my knowledge catches up and I find myself horrified at my own code (likely).</p>
<p><strong>t.tweetField</strong><br />
This is the tweet&#8217;s textfield. Again, a bit naughty methinks, but it&#8217;s a means to an end. I&#8217;ve purposefully left it public in order for you to be able style the text to your heart&#8217;s content. </p>
<p>For example, to give the tweet a background colour and change it&#8217;s width you should do something like the following:</p>
<p><code>t.tweetField.background = true;<br />
t.tweetField.backgroundColor = 0xeeeeee;<br />
t.tweetField.width = 280; </code></p>
<p>You can also style the text field using a style sheet. The time and date are wrapped in a <strong>h1</strong> tag and the main text is wrapped in a <strong>p</strong>. If you decide to use my <a href="http://www.burnedouthippy.com/2009/08/the-cssloader-class-v1-0/" target="_blank">CSSLoader class</a>, all you would have to do is create a simple stylesheet and then type something like the following:</p>
<p><code>var cssLoader:CSSLoader = new CSSLoader(t.tweetField, t.tweetField.text, "http://www.yourdomain.com/tweetStyles.css");</code></p>
<p>I&#8217;ve included as much as I can in the example files so that you can get up and running as quickly as possible. Please make sure that you preserve the folder names of my classes or else nothing will work for you. Please also note that Tweeter uses my <a href="http://www.burnedouthippy.com/2009/07/the-findurl-class-v1-0/">FindURL class</a>, so don&#8217;t delete it by accident!</p>
<p><strong>**************************************************************</strong></p>
<p><strong><a href="http://www.burnedouthippy.com/downloads/tweeter/tweeter.zip" target="_blank">You can download Tweeter and the other classes here</a></strong><br />
<strong><a href="http://www.burnedouthippy.com/downloads/tweeter/tweeter_example_files.zip" target="_blank">You can download the examples here</a></strong></p>
<p><strong>**************************************************************</strong></p>
<p>I hope it&#8217;s useful to someone out there. I&#8217;ll be working on a multi-tweet version next (for multiple tweets from a single user) and possibly a keyword search version after that. If you&#8217;d like to see something particular changed or added to this version, please do let me know by leaving a comment below.</p>
<p>Cheerio!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.burnedouthippy.com/2009/08/tweeter-v1-0-simplifying-twitter-and-actionscript/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
		<item>
		<title>The CSSLoader Class (v1.0)</title>
		<link>http://www.burnedouthippy.com/2009/08/the-cssloader-class-v1-0/</link>
		<comments>http://www.burnedouthippy.com/2009/08/the-cssloader-class-v1-0/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 17:15:48 +0000</pubDate>
		<dc:creator>The Hippy</dc:creator>
				<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[Classes]]></category>
		<category><![CDATA[Downloads]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[loader]]></category>
		<category><![CDATA[processor]]></category>
		<category><![CDATA[stylesheet]]></category>

		<guid isPermaLink="false">http://www.burnedouthippy.com/?p=37</guid>
		<description><![CDATA[AS3 is a wonderful thing, but it can be really long-winded sometimes when you&#8217;re trying to achieve something simple &#8211; the perfect example being the replacement of AS2&#8242;s getURL() class with a series of listeners. I know why it has been set up this way, I understand why it&#8217;s better that everything follows a uniform [...]]]></description>
			<content:encoded><![CDATA[<p>AS3 is a wonderful thing, but it can be really long-winded sometimes when you&#8217;re trying to achieve something simple &#8211; the perfect example being the replacement of AS2&#8242;s getURL() class with a series of listeners. I know why it has been set up this way, I understand why it&#8217;s better that everything follows a uniform methodology and I do wholeheartedly agree with it, but there is no getting around the fact that you can get bogged down writing the same long-winded code over and over again.  Frankly, it can be a pain in the ass and can sap the fun out of simple tasks.</p>
<p>Sometimes I get around these chunks of code using snippets (see <a href="http://www.gotoandlearn.com/play?id=94" target="_blank">Lee Brimelow&#8217;s tutorial on how to set up snippets in Flex Builder</a>), but sometimes the code is crying out for a simple class to be made &#8211; in my opinion, loading external stylesheets is one of these times.</p>
<p><span id="more-37"></span></p>
<p>If you google &#8220;actionscript 3 external stylesheets&#8221; you are very likely to come across <a href="http://www.adobe.com/livedocs/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&#038;file=00000232.html" target="_blank">this explanation</a> by Adobe. </p>
<p>Now don&#8217;t get me wrong, after studying it for a couple of minutes you&#8217;ll see that the code is pretty straightforward. Firstly it sets up a textfield, then an external file loader. Then it uses the file loader to load the stylesheet and when the stylesheet has been successfully loaded it applies the stylesheet to the textfield and adds the appropriate HTML text. Fine. Long-winded, but fine.</p>
<p>But this is exactly the kind of situation that frustrates me. If I wanted to load several stylesheets for several different textfields, I&#8217;d be backed up in a pile of repeating code setting up loaders and success/error functions. It makes much more sense to me to have a CSSLoader class that I can simply send the instance name of the textfield, the text that I want to put into the textfield and the name/path of the stylesheet file &#8211; and then let the class set up a loader and check that the file has loaded correctly. As I currently can&#8217;t think of a situation where this wouldn&#8217;t apply, that is exactly what I&#8217;ve done.</p>
<p><a href="http://www.burnedouthippy.com/downloads/CSSLoader/CSSLoader.zip" target="_blank">You can find the class here.</a><br />
<a href="http://www.burnedouthippy.com/downloads/CSSLoader/CSSLoader_example_files.zip" target="_blank">You can find example files here.</a></p>
<p>Now all you have to do is create a textfield and then type something similar to the following:</p>
<p><code>var cssLoader:CSSLoader = new CSSLoader(tfield, someText, "example.css");</code></p>
<p>Isn&#8217;t that easier? In this case, &#8220;tfield&#8221; is the instance name of the textfield, &#8220;someText&#8221; is a String containing the HTML text you want to format (eg taken from an XML node) and &#8220;example.css&#8221; is the name/path of the external stylesheet. The class does the rest for you &#8211; it takes the text, throws it into the textfield and styles it.  Much easier I&#8217;m sure you&#8217;ll agree and a lot less confusing when it comes to dealing with large numbers of textfields.</p>
<p>Please remember to set the textfield property &#8220;Multiline&#8221; to &#8220;true&#8221;, or else your HTML paragraph tags won&#8217;t work. Check out my <a href="http://www.burnedouthippy.com/downloads/CSSLoader/CSSLoader_eample_files.zip" target="_blank">basic example</a> to see that in action.</p>
<p>If you can think of any situation where this class may need extending, please let me know. I am open to friendly suggestion of expanding its usefulness. </p>
<p>However if you&#8217;re a hardcore developer and don&#8217;t agree with me simplifying something that is essentially pretty simple to start with &#8211; I apologise if I have offended your sensibility, but this works better for me. Please don&#8217;t spam me, I won&#8217;t reply. I&#8217;m here to help like-minded designer/developers, not to get into an argument. Cheers! <img src='http://www.burnedouthippy.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.burnedouthippy.com/2009/08/the-cssloader-class-v1-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updated: FindURL (v1.1)</title>
		<link>http://www.burnedouthippy.com/2009/08/updated-findurl-v1-1/</link>
		<comments>http://www.burnedouthippy.com/2009/08/updated-findurl-v1-1/#comments</comments>
		<pubDate>Thu, 06 Aug 2009 19:20:08 +0000</pubDate>
		<dc:creator>The Hippy</dc:creator>
				<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[Classes]]></category>
		<category><![CDATA[Downloads]]></category>
		<category><![CDATA[Updates]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[processor]]></category>

		<guid isPermaLink="false">http://www.burnedouthippy.com/?p=33</guid>
		<description><![CDATA[The FindURL class has been updated and the new version can be found here. This new version corrects a rather embarrassing issue &#8211; the class was returning no text at all if no URL was present in the text. I was so wrapped up with trying to get it to look for URLs in a [...]]]></description>
			<content:encoded><![CDATA[<p>The FindURL class has been updated and <a href="http://www.burnedouthippy.com/downloads/findURL/FindURL.zip" target="_blank">the new version can be found here</a>.</p>
<p>This new version corrects a rather embarrassing issue &#8211; the class was returning no text at all if no URL was present in the text. I was so wrapped up with trying to get it to look for URLs in a text block, it didn&#8217;t cross my mind to test it without any at all! Problem solved now though, simply overwrite the previous version and everything should work as before.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.burnedouthippy.com/2009/08/updated-findurl-v1-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The FindURL class (v1.0)</title>
		<link>http://www.burnedouthippy.com/2009/07/the-findurl-class-v1-0/</link>
		<comments>http://www.burnedouthippy.com/2009/07/the-findurl-class-v1-0/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 18:13:37 +0000</pubDate>
		<dc:creator>The Hippy</dc:creator>
				<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[Classes]]></category>
		<category><![CDATA[Downloads]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[processor]]></category>

		<guid isPermaLink="false">http://www.burnedouthippy.com/?p=12</guid>
		<description><![CDATA[Whilst I was playing around with the Twitter API I was beginning to get wound up by the fact that the XML feed from Twitter only sends out text versions of tweets and not HTML versions. For example, lets say a tweet says &#8220;Check out this cool link: http://www.plagro.com&#8221;, the xml feed from twitter would [...]]]></description>
			<content:encoded><![CDATA[<p>Whilst I was playing around with the Twitter API I was beginning to get wound up by the fact that the XML feed from Twitter only sends out text versions of tweets and not HTML versions. For example, lets say a tweet says &#8220;Check out this cool link: http://www.plagro.com&#8221;, the xml feed from twitter would send out:</p>
<p><code >Check out this cool link: http://www.plagro.com"</code></p>
<p>as oppose to the html version containing the &#8220;a&#8221; link tag:</p>
<p><code >Check out this cool link: &lt;a href="http://www.plagro.com"&gt;http://www.plagro.com&lt;/a&gt;</code></p>
<p>So after trawling the forums looking for alternative feeds and/or HTML convertors, I came to the conclusion that it would be easier to write a small class that simply finds links within blocks of text and adds in the html tags so it can be displayed as HTML text.  The result is the FindURL class.</p>
<p><span id="more-12"></span></p>
<p>You can find the <a href="http://www.burnedouthippy.com/downloads/findURL/FindURL.zip" target="_blank">FindURL class here</a> and <a href="http://www.burnedouthippy.com/downloads/findURL/FindURL_example_files.zip" target="_blank">example files here</a>.</p>
<p>
<object width="400" height="250">
<param name="movie" value="http://www.burnedouthippy.com/downloads/findURL/FindURL.swf"></param>
<param name="quality" value="high"></param>
<param name="wmode" value="window"></param>
<param name="menu" value="false"></param>
<param name="bgcolor" value="#FFFFFF"></param>
<embed type="application/x-shockwave-flash" width="400" height="250" src="http://www.burnedouthippy.com/downloads/findURL/FindURL.swf" quality="high" bgcolor="#FFFFFF" wmode="window" menu="false" ></embed>
</object>
</p>
<p>Using the FindURL class is very simple. Firstly unzip it into the place where you store all of your actionscript classes and then use the following two lines of AS code whenever it&#8217;s needed. Feed it the text you want converting and then receive the String it returns.</p>
<p><code>//create a new FindURL and send it the text to process<br />
var linkFinder:FindURL = new FindURL(testString);<br />
//return the new processed text<br />
var newString:String = linkFinder.Process();</code></p>
<p>Finally, please note that I found the Regular Expression used in my FindURL class online. It IS borrowed, it may not be perfect and I can&#8217;t offer you any support on it. I will also happily credit the line&#8217;s author when I eventually work out who that is &#8211; but that particular piece of code has been used seemingly dozens of times by different developers so the author is still ambiguous.</p>
<p>Hope it&#8217;s of use to you! Let me know how you get on and if there&#8217;s any way you&#8217;d like to see it expanded &#8211; I&#8217;m always open to suggestion.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.burnedouthippy.com/2009/07/the-findurl-class-v1-0/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
