<?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>Tomorrow Evening</title>
	<atom:link href="http://blog.tomorrowevening.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.tomorrowevening.com</link>
	<description>Digitally Driven</description>
	<lastBuildDate>Fri, 16 Jul 2010 06:33:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Particle Play</title>
		<link>http://blog.tomorrowevening.com/pro/particle-play/</link>
		<comments>http://blog.tomorrowevening.com/pro/particle-play/#comments</comments>
		<pubDate>Fri, 16 Jul 2010 06:17:06 +0000</pubDate>
		<dc:creator>Colin</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Processing]]></category>
		<category><![CDATA[Xcode]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[openFrameworks]]></category>
		<category><![CDATA[Multitouch]]></category>
		<category><![CDATA[Physics]]></category>

		<guid isPermaLink="false">http://blog.tomorrowevening.com/?p=278</guid>
		<description><![CDATA[First stages of my first personal iPhone/iPad App. Red circles are touch points. Double tap to change from creating gravitational fields to adding particles. Originally written in Processing, Particle Play has been converted to C++ using OpenGL and openFrameworks.]]></description>
			<content:encoded><![CDATA[<p>First stages of my first personal iPhone/iPad App.<br />
<object width="500" height="331"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=13350292&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=c9ff23&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=13350292&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=c9ff23&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="500" height="331"></embed></object><br />
Red circles are touch points.<br />
Double tap to change from creating gravitational fields to adding particles.</p>
<p>Originally written in Processing, Particle Play has been converted to C++ using OpenGL and openFrameworks.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tomorrowevening.com/pro/particle-play/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Xcode 3.2.3 Problems and Solutions</title>
		<link>http://blog.tomorrowevening.com/xcode/xcode-3-2-3-problems-and-solutions/</link>
		<comments>http://blog.tomorrowevening.com/xcode/xcode-3-2-3-problems-and-solutions/#comments</comments>
		<pubDate>Mon, 05 Jul 2010 23:04:53 +0000</pubDate>
		<dc:creator>Colin</dc:creator>
				<category><![CDATA[Xcode]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://blog.tomorrowevening.com/?p=270</guid>
		<description><![CDATA[Upgrading to Xcode 3.2.3 can give you a few problems at first, but here's how I've found out how to fix those issues. Problem Immediately when opening older files you're going to get a "Missing Base SDK" error. Solution Under the Groups &#38; Files panel, you'll see a group called Targets. Expand the Targets group [...]]]></description>
			<content:encoded><![CDATA[<p>Upgrading to Xcode 3.2.3 can give you a few problems at first, but here's how I've found out how to fix those issues.<br />
<span id="more-270"></span><br />
<strong>Problem</strong><br />
Immediately when opening older files you're going to get a "<strong>Missing Base SDK</strong>" error.</p>
<p><strong>Solution</strong><br />
Under the <strong>Groups &amp; Files</strong> panel, you'll see a group called <strong>Targets</strong>. Expand the Targets group and double click on your project name.<br />
Make sure you're in the <strong>Build panel</strong>.<br />
Under <strong>Architectures</strong>, change the <strong>Base SDK</strong> to iPhone Device 3.2 or above.</p>
<p><strong>Problem</strong><br />
OpenFrameworks iPhone projects won't compile, most common issue is a <strong>DWARF</strong> issue.</p>
<p><strong>Solution</strong><br />
1. Download the mac version of OF.<br />
2. In the mac version, navigate to libs/FreeImage/lib/osx/<br />
3. Copy the file "freeimage.a" to libs/FreeImage/lib/iPhone<br />
4. In the iPhone version, rename "libFreeImage_iphone_universal.a" to "libFreeImage_iphone_universal_iphone.a"<br />
5. Rename "freeimage.a" to "libFreeImage_iphone_universal.a"</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tomorrowevening.com/xcode/xcode-3-2-3-problems-and-solutions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Code</title>
		<link>http://blog.tomorrowevening.com/other/google-code/</link>
		<comments>http://blog.tomorrowevening.com/other/google-code/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 21:25:58 +0000</pubDate>
		<dc:creator>Colin</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Other]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://blog.tomorrowevening.com/?p=268</guid>
		<description><![CDATA[I now have a Google Code page to offer open-source classes.]]></description>
			<content:encoded><![CDATA[<p>I now have a <a href="http://code.google.com/p/duffy/">Google Code</a> page to offer open-source classes.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tomorrowevening.com/other/google-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash Filters</title>
		<link>http://blog.tomorrowevening.com/fla/flash-filters/</link>
		<comments>http://blog.tomorrowevening.com/fla/flash-filters/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 04:03:20 +0000</pubDate>
		<dc:creator>Colin</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://blog.tomorrowevening.com/?p=264</guid>
		<description><![CDATA[I recently was working on a project where most Display Object's on my stage had an outer glow with an Add blend mode. In this instance, I got quite lucky because each object's filter settings were the same. It made a lot of sense to code the filter rather than duplicate the setting for the [...]]]></description>
			<content:encoded><![CDATA[<p>I recently was working on a project where most <em>Display Object</em>'s on my stage had an outer glow with an <em>Add</em> blend mode. In this instance, I got quite lucky because each object's filter settings were the same.  It made a lot of sense to code the filter rather than duplicate the setting for the dozens of objects that were spread apart the project. Here's the basis of what I used:</p>
<pre class="actionscript3"><span style="color: #808080; font-style: italic;">/**
 * Adds the universal glow to the display object.
 * @param displayObject The display object to receive the glow.
 * @param container The container to hold the newly created snapshot.GlowMC.PAGE_VECTOR.
 */</span>
<span style="color: #b1b100;">public</span> <span style="color: #b1b100;">static</span> <span style="color: #b1b100;">function</span> addGlow<span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">displayObject</span>:<span style="color: #0066CC;">DisplayObject</span>, container:<span style="color: #0066CC;">DisplayObjectContainer</span> <span style="color: #66cc66;">&#41;</span>:<span style="color: #b1b100;">void</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #808080; font-style: italic;">// Capture an instance of the displayObject</span>
	<span style="color: #b1b100;">var</span> rect:Rectangle = new Rectangle<span style="color: #66cc66;">&#40;</span> <span style="color: #cc66cc;">-1</span>, <span style="color: #cc66cc;">-1</span>, <span style="color: #0066CC;">displayObject</span>.<span style="color: #0066CC;">width</span> + <span style="color: #cc66cc;">2</span>, <span style="color: #0066CC;">displayObject</span>.<span style="color: #0066CC;">width</span> + <span style="color: #cc66cc;">2</span> <span style="color: #66cc66;">&#41;</span>;
	<span style="color: #b1b100;">var</span> bmd:<span style="color: #0066CC;">BitmapData</span> = new <span style="color: #0066CC;">BitmapData</span><span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">displayObject</span>.<span style="color: #0066CC;">width</span> + <span style="color: #cc66cc;">2</span>, <span style="color: #0066CC;">displayObject</span>.<span style="color: #0066CC;">height</span> + <span style="color: #cc66cc;">2</span>, <span style="color: #b1b100;">true</span>, 0xFF <span style="color: #66cc66;">&#41;</span>;
	bmd.<span style="color: #006600;">draw</span><span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">displayObject</span>, <span style="color: #b1b100;">null</span>, <span style="color: #b1b100;">null</span>, <span style="color: #b1b100;">null</span>, rect, <span style="color: #b1b100;">true</span> <span style="color: #66cc66;">&#41;</span>;
&nbsp;
	<span style="color: #808080; font-style: italic;">// Apply the Capture</span>
	<span style="color: #b1b100;">var</span> <span style="color: #0066CC;">bitmap</span>:<span style="color: #0066CC;">Bitmap</span> = new <span style="color: #0066CC;">Bitmap</span><span style="color: #66cc66;">&#40;</span> bmd <span style="color: #66cc66;">&#41;</span>;
	<span style="color: #b1b100;">var</span> <span style="color: #0066CC;">filters</span>:<span style="color: #0066CC;">Array</span> = container.<span style="color: #0066CC;">filters</span>;
	<span style="color: #b1b100;">var</span> glowFilter:GlowFilter = new GlowFilter<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	glowFilter.<span style="color: #006600;">blurX</span> = glowFilter.<span style="color: #006600;">blurY</span> = <span style="color: #cc66cc;">10</span>;
	glowFilter.<span style="color: #006600;">inner</span> = <span style="color: #b1b100;">false</span>;
	glowFilter.<span style="color: #006600;">knockout</span> = <span style="color: #b1b100;">true</span>;
	glowFilter.<span style="color: #006600;">strength</span> = <span style="color: #cc66cc;">1</span>;
	glowFilter.<span style="color: #006600;">quality</span> = <span style="color: #cc66cc;">2</span>;
	glowFilter.<span style="color: #0066CC;">color</span> = 0xFFFFFF;
&nbsp;
	<span style="color: #808080; font-style: italic;">// Set</span>
	<span style="color: #0066CC;">filters</span><span style="color: #66cc66;">&#91;</span><span style="color: #0066CC;">filters</span>.<span style="color: #006600;">length</span><span style="color: #66cc66;">&#93;</span> = glowFilter;
	<span style="color: #0066CC;">bitmap</span>.<span style="color: #0066CC;">filters</span> = <span style="color: #0066CC;">filters</span>;
	<span style="color: #0066CC;">bitmap</span>.<span style="color: #0066CC;">blendMode</span> = <span style="color: #ff0000;">&quot;add&quot;</span>;
	container.<span style="color: #0066CC;">addChild</span><span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">bitmap</span> <span style="color: #66cc66;">&#41;</span>;
&nbsp;
	<span style="color: #808080; font-style: italic;">// Clear vars</span>
	rect = <span style="color: #b1b100;">null</span>;
	bmd = <span style="color: #b1b100;">null</span>;
	<span style="color: #0066CC;">bitmap</span> = <span style="color: #b1b100;">null</span>;
	<span style="color: #0066CC;">filters</span> = <span style="color: #b1b100;">null</span>;
	glowFilter = <span style="color: #b1b100;">null</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;</pre>
<p>Also, it's best to add the filter object into a container so the blend mode works properly.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tomorrowevening.com/fla/flash-filters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ANT and Flex</title>
		<link>http://blog.tomorrowevening.com/flex/ant-and-flex/</link>
		<comments>http://blog.tomorrowevening.com/flex/ant-and-flex/#comments</comments>
		<pubDate>Tue, 04 May 2010 17:01:44 +0000</pubDate>
		<dc:creator>Colin</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://blog.tomorrowevening.com/?p=244</guid>
		<description><![CDATA[While writing my framework about 6 months ago, I wanted to create ASDocs for it so anyone using the framework would know how to work with it. I also love the idea of compiling all the source into a SWC file to make sending that source very easy to do. It's a very cumbersome process [...]]]></description>
			<content:encoded><![CDATA[<p>While writing my framework about 6 months ago, I wanted to create ASDocs for it so anyone using the framework would know how to work with it. I also love the idea of compiling all the source into a SWC file to make sending that source very easy to do. It's a very cumbersome process to create ASDocs and compile to a SWC through the executable files by itself, and upon research discovered <a href="http://ant.apache.org/" target="_blank">ANT</a>.<br />
<span id="more-244"></span> For those who don't know, ANT can be seen as the middle man between you and sending commands to a Java build tool.  From there, you send ANT an XML file of the commands to run to the appropriate Java file. Sound easy? Heck ya it is.<br />
I use Flex, however you can install ANT with any Eclipse based IDE. Please note, the majority of my build.xml is a combination of source I've found on multiple blogs, this post is the verdict of what I've learned with what I've found.<br />
First, let's create out XML document. Title it "build.xml". The "project name" is the name reference you'll see in the ant window.</p>
<pre class="xml">&nbsp;
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;project</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;SWC and ASDoc Build&quot;</span> <span style="color: #000066;">default</span>=<span style="color: #ff0000;">&quot;main&quot;</span> <span style="font-weight: bold; color: black;">&gt;</span></span></pre>
<p>Second, we want to create variables within the script so it makes referencing files and folders easier.</p>
<pre class="xml"><span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- CREATE THE VARS --&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;FLEX_HOME&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;/Applications/Adobe Flex Builder 3/sdks/4.0.0&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;asdoc.exe&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;${FLEX_HOME}/bin/asdoc&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;project.path&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;/Users/Duffy/Desktop/Projects/Clients/INC/Framework&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;output&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;${project.path}/local&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;src&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;${project.path}/src&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;version&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
&nbsp;
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;taskdef</span> <span style="color: #000066;">resource</span>=<span style="color: #ff0000;">&quot;flexTasks.tasks&quot;</span> <span style="color: #000066;">classpath</span>=<span style="color: #ff0000;">&quot;${FLEX_HOME}/ant/lib/flexTasks.jar&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- SWC Related --&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;output.swc&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;${output}/swc&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;swc.title&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;duff&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- AS DOC Related --&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;output.docs&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;${output}/asdocs&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;doc.title&quot;</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;Duff API v.${version}&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
&nbsp;</pre>
<p>Here you'll see I'm referencing where the .exe ("asdoc.exe") and .jar ("flexTasks.tasks") files exist on my machine so ant knows how to use the compiler. I also reference where my project is located, as well as the source folder ("src") and output folders("output.swc" and "output.docs").</p>
<p><strong>Note</strong><br />
I have periods delimit spaces with my variables with ANT, however you can name them however you want: "outputSWC", "output.swc", "output-swc" as examples.</p>
<p>Next, I'm going to tell ANT what functions it'll need to run. First and foremost, I want ANT to not "think" about overwriting files, so I'll delete a directory, then recreate it to save it the trouble. After that's done, I'll have it create the docs and the swc.</p>
<pre class="xml">&nbsp;
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;main&quot;</span> <span style="color: #000066;">depends</span>=<span style="color: #ff0000;">&quot;clean-asdoc-directory, create-docs, clean-swc-directory, generate-swc&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
&nbsp;
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;clean-asdoc-directory&quot;</span> <span style="font-weight: bold; color: black;">&gt;</span></span>
   <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;delete</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${output.swc}&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
   <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;mkdir</span>  <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${output.swc}&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/target<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- runs the asdoc.exe compiler on the source --&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;create-docs&quot;</span> <span style="font-weight: bold; color: black;">&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;exec</span> <span style="color: #000066;">executable</span>=<span style="color: #ff0000;">&quot;${asdoc.exe}&quot;</span> <span style="color: #000066;">failonerror</span>=<span style="color: #ff0000;">&quot;true&quot;</span> <span style="font-weight: bold; color: black;">&gt;</span></span>
    	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;arg</span> <span style="color: #000066;">line</span>=<span style="color: #ff0000;">&quot;-doc-sources '${src}'&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
    	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;arg</span> <span style="color: #000066;">line</span>=<span style="color: #ff0000;">'-window-title &quot;${doc.title}&quot;'</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
    	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;arg</span> <span style="color: #000066;">line</span>=<span style="color: #ff0000;">&quot;-main-title '${doc.title}'&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
    	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;arg</span> <span style="color: #000066;">line</span>=<span style="color: #ff0000;">&quot;-output ${output.docs}&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/exec<span style="font-weight: bold; color: black;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;echo<span style="font-weight: bold; color: black;">&gt;</span></span></span>ASDOC created successfully<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/echo<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/target<span style="font-weight: bold; color: black;">&gt;</span></span></span></pre>
<p>The first function is "clean-asdoc-directory", which deletes the directory then recreates it. We'll use the same functionality for compiling the SWC.  Next, we have it create the documentation by running our ASDoc executable file. Each "arg line" is an argument that's sent to the executable so it receives the required variables. As you can see about, I have many "${}" lines, which are references to the "property" (aka variables) we created above. We also want the executable build to fail if there's any problems at all.</p>
<p>Now, let's compile that swc.</p>
<pre class="xml"><span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- deletes and recreates the swc directory --&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;clean-swc-directory&quot;</span> <span style="font-weight: bold; color: black;">&gt;</span></span>
   <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;delete</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${output.swc}&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
   <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;mkdir</span>  <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${output.swc}&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/target<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #808080; font-style: italic;">&lt;!-- generate the swc --&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;target</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;generate-swc&quot;</span> <span style="color: #000066;">description</span>=<span style="color: #ff0000;">&quot;Compile the SWC file&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
&nbsp;
	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;fileset</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;sources&quot;</span> <span style="color: #000066;">dir</span>=<span style="color: #ff0000;">&quot;${src}&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;include</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;**/*.as&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/fileset<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;pathconvert</span> <span style="color: #000066;">property</span>=<span style="color: #ff0000;">&quot;classes&quot;</span> <span style="color: #000066;">pathsep</span>=<span style="color: #ff0000;">&quot; &quot;</span> <span style="color: #000066;">refid</span>=<span style="color: #ff0000;">&quot;sources&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;chainedmapper<span style="font-weight: bold; color: black;">&gt;</span></span></span>
			<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;globmapper</span> <span style="color: #000066;">from</span>=<span style="color: #ff0000;">&quot;${src}/*&quot;</span> <span style="color: #000066;">to</span>=<span style="color: #ff0000;">&quot;*&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;mapper</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;package&quot;</span> <span style="color: #000066;">from</span>=<span style="color: #ff0000;">&quot;*.as&quot;</span> <span style="color: #000066;">to</span>=<span style="color: #ff0000;">&quot;*&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/chainedmapper<span style="font-weight: bold; color: black;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/pathconvert<span style="font-weight: bold; color: black;">&gt;</span></span></span>
&nbsp;
	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;compc</span> <span style="color: #000066;">output</span>=<span style="color: #ff0000;">&quot;${output.swc}/${swc.title}.${version}.swc&quot;</span> <span style="color: #000066;">include-classes</span>=<span style="color: #ff0000;">&quot;${classes}&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
		<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;source-path</span> <span style="color: #000066;">path-element</span>=<span style="color: #ff0000;">&quot;${src}&quot;</span> <span style="font-weight: bold; color: black;">/&gt;</span></span>
	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/compc<span style="font-weight: bold; color: black;">&gt;</span></span></span>
	<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;echo<span style="font-weight: bold; color: black;">&gt;</span></span></span>SWC created successfully<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/echo<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/target<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/project<span style="font-weight: bold; color: black;">&gt;</span></span></span></pre>
<p>The beauty about this "generate-swc" method is that it compiles all .as files within your "src" directory, whereas normally you would either have to manually input each class or each package.<br />
You can <a href="http://blog.tomorrowevening.com/content/2010/05/build.zip">download the final result here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tomorrowevening.com/flex/ant-and-flex/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
