<?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; loader</title>
	<atom:link href="http://www.burnedouthippy.com/tag/loader/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.burnedouthippy.com</link>
	<description>~ Hugging Flash into submission ~</description>
	<lastBuildDate>Mon, 07 Nov 2011 09:42:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.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>
<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/share?url=http://www.burnedouthippy.com/2010/02/actionscript-3-geturl-class/&text=Actionscript+3+getURL%28%29+class&via=burnedouthippy" title="Post to Twitter"><img class="nothumb" src="http://www.burnedouthippy.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro3.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.facebook.com/share.php?u=http://www.burnedouthippy.com/2010/02/actionscript-3-geturl-class/&amp;t=Actionscript+3+getURL%28%29+class" title="Post to Facebook"><img class="nothumb" src="http://www.burnedouthippy.com/wp-content/plugins/tweet-this/icons/en/facebook/tt-facebook-micro3.png" alt="Post to Facebook" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://stumbleupon.com/submit?url=http://www.burnedouthippy.com/2010/02/actionscript-3-geturl-class/&amp;title=Actionscript+3+getURL%28%29+class" title="Post to StumbleUpon"><img class="nothumb" src="http://www.burnedouthippy.com/wp-content/plugins/tweet-this/icons/en/su/tt-su-micro3.png" alt="Post to StumbleUpon" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://digg.com/submit?url=http://www.burnedouthippy.com/2010/02/actionscript-3-geturl-class/&amp;title=Actionscript+3+getURL%28%29+class" title="Post to Digg"><img class="nothumb" src="http://www.burnedouthippy.com/wp-content/plugins/tweet-this/icons/en/digg/tt-digg-micro3.png" alt="Post to Digg" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.burnedouthippy.com/2010/02/actionscript-3-geturl-class/feed/</wfw:commentRss>
		<slash:comments>2</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>
<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/share?url=http://www.burnedouthippy.com/2009/08/the-cssloader-class-v1-0/&text=The+CSSLoader+Class+%28v1.0%29&via=burnedouthippy" title="Post to Twitter"><img class="nothumb" src="http://www.burnedouthippy.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter-micro3.png" alt="Post to Twitter" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.facebook.com/share.php?u=http://www.burnedouthippy.com/2009/08/the-cssloader-class-v1-0/&amp;t=The+CSSLoader+Class+%28v1.0%29" title="Post to Facebook"><img class="nothumb" src="http://www.burnedouthippy.com/wp-content/plugins/tweet-this/icons/en/facebook/tt-facebook-micro3.png" alt="Post to Facebook" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://stumbleupon.com/submit?url=http://www.burnedouthippy.com/2009/08/the-cssloader-class-v1-0/&amp;title=The+CSSLoader+Class+%28v1.0%29" title="Post to StumbleUpon"><img class="nothumb" src="http://www.burnedouthippy.com/wp-content/plugins/tweet-this/icons/en/su/tt-su-micro3.png" alt="Post to StumbleUpon" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://digg.com/submit?url=http://www.burnedouthippy.com/2009/08/the-cssloader-class-v1-0/&amp;title=The+CSSLoader+Class+%28v1.0%29" title="Post to Digg"><img class="nothumb" src="http://www.burnedouthippy.com/wp-content/plugins/tweet-this/icons/en/digg/tt-digg-micro3.png" alt="Post to Digg" /></a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.burnedouthippy.com/2009/08/the-cssloader-class-v1-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

