<?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>Blue Flex &#187; flex builder</title>
	<atom:link href="http://kennethsutherland.com/tag/flex-builder/feed/" rel="self" type="application/rss+xml" />
	<link>http://kennethsutherland.com</link>
	<description>Flex with a hint of cool</description>
	<lastBuildDate>Fri, 30 Apr 2010 11:17:21 +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>Simple tip #3 &#8211; Utility SWC (library project)</title>
		<link>http://kennethsutherland.com/2009/06/12/simple-tip-3-utility-swc-library-project/</link>
		<comments>http://kennethsutherland.com/2009/06/12/simple-tip-3-utility-swc-library-project/#comments</comments>
		<pubDate>Fri, 12 Jun 2009 08:12:08 +0000</pubDate>
		<dc:creator>Kenneth</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[flex builder]]></category>
		<category><![CDATA[swc]]></category>
		<category><![CDATA[utility file]]></category>

		<guid isPermaLink="false">http://kennethsutherland.com/?p=509</guid>
		<description><![CDATA[Do you frequently use simple actionscript functions in more than one project. Perhaps you&#8217;ve got a function to do tracking, parse strings to dates, or return a random colour etc. I&#8217;m sure most folk will have struggled to think of what project they last used a generic function ABC in as they could do with [...]]]></description>
			<content:encoded><![CDATA[<p>Do you frequently use simple actionscript functions in more than one project. Perhaps you&#8217;ve got a function to do tracking, parse strings to dates, or return a random colour etc.</p>
<p>I&#8217;m sure most folk will have struggled to think of what project they last used a generic function ABC in as they could do with using it for project XYZ and would rather spend 30 mins searching for said function rather than rewrite it.</p>
<p>Well as explained below is a way to stop this from happening and hopefully save you a heap of time.</p>
<ul>
<li>
<h6>Step 1</h6>
<p> &#8211; Create a library project.</li>
<li>So using flexbuilder, go to File-&gt;New-&gt;Flex Library Project.</li>
<li>This will create an empty library project.</li>
</ul>
<ul>
<li>
<h6>Step 2</h6>
<p> &#8211; add in your Utilty class to the library project.</li>
<li>To do this add/create a Utility actionscript file that contains your static functions. Save, and this should then automaticlaly create a SWC file inside the library bin folder. (If it hasn&#8217;t and the file added has no errors then check the project properties to make sure the newly added file is being included &#8211; see pic)</li>
</ul>
<p><img class="aligncenter" title="Library path for adding files to SWC" src="/images/utility (Custom).JPG" alt="" width="600" height="185" /></p>
<ul>
<li>
<h6>Step 3</h6>
<p> &#8211; add the reference of the newly created SWC file to any project you intend to use it in.</li>
<li>So go to your project you wish to use the SWC with, then select the projects properties and inside &#8216;Flex build path&#8217; select &#8216;Add SWC&#8217;.</li>
<li>Browse to the the previous library project and select the SWC from its bin folder.</li>
</ul>
<p><img class="aligncenter" title="Adding a SWC to you project" src="/images/addSWC (Custom).JPG" alt="" width="600" height="222" /></p>
<p>You are now done, any time you update the code in the library project, those changes will be reflected in any project that references the SWC file automatically.</p>
<table width="100%">
<tr>
<td>
<p style="text-align: left;">
<a title="Simple tip #2" href="http://kennethsutherland.com/2009/06/12/simple-tip-2-random-colours/" target="_self">Previous Tip<br />
</a>
</p>
</td>
<td>
<p style="text-align: right;">
</td>
</tr>
</table>
<p style="text-align: center;"><script type="text/javascript"><!--
google_ad_client = "pub-7396620608505330";
google_ad_slot = "1277482570";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
]]></content:encoded>
			<wfw:commentRss>http://kennethsutherland.com/2009/06/12/simple-tip-3-utility-swc-library-project/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
