<?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 &#187; AS3</title>
	<atom:link href="http://blog.tomorrowevening.com/tag/as3/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>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>
		<item>
		<title>Error proofing SWFAddress</title>
		<link>http://blog.tomorrowevening.com/fla/error-proofing-swfaddress/</link>
		<comments>http://blog.tomorrowevening.com/fla/error-proofing-swfaddress/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 00:22:41 +0000</pubDate>
		<dc:creator>Colin</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Download]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://blog.tomorrowevening.com/?p=217</guid>
		<description><![CDATA[SWFAddress is a great library which all flash sites should incorporate. However, giving the user control of changing the URL address can break your site. Because many flash websites don't check for this, the user is often left not viewing content. I created a utility class to do the following: Navigate a website based off [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.asual.com/swfaddress/">SWFAddress</a> is a great library which all flash sites should incorporate.  However, giving the user control of changing the URL address can break your site. Because many flash websites don't check for this, the user is often left not viewing content.<br />
I created a utility class to do the following:</p>
<ul>
<li>Navigate a website based off valid deeplink possibilities.</li>
<li>Enable multiple URL values for a single page.</li>
<li>Check for valid URL requests, then act accordingly.</li>
<li>Set a default homepage so the website doesn't redirect you to a "/#/homepage".</li>
</ul>
<p>The last item in that list has become a pet peeve of mine. In my opinion, a website shouldn't auto-direct you to a "yoursite.com/#/home". It should keep the homepage URL until there's user interaction (such as clicking a link).</p>
<p><a href="http://blog.tomorrowevening.com/content/2010/03/ExampleSite.zip">Source</a> - <a href="http://blog.tomorrowevening.com/content/2010/03/ExampleSite/">Online Example</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tomorrowevening.com/fla/error-proofing-swfaddress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>File Drag</title>
		<link>http://blog.tomorrowevening.com/flex/file-drag/</link>
		<comments>http://blog.tomorrowevening.com/flex/file-drag/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 23:19:04 +0000</pubDate>
		<dc:creator>Colin</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Experiment]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://blog.tomorrowevening.com/?p=194</guid>
		<description><![CDATA[Over the past 2 or so months I've been using Flex for all my AS projects. Usually when I need to figure something out, I'll create a new FLA document and throw all my code into the timeline until it's been worked out, then bring it back into the class files. However, I've found this [...]]]></description>
			<content:encoded><![CDATA[<p>Over the past 2 or so months I've been using Flex for all my AS projects. Usually when I need to figure something out, I'll create a new FLA document and throw all my code into the timeline until it's been worked out, then bring it back into the class files. However, I've found this to be a big pain in the butt when creating AIR applications.  For some reason it only lets me test AIR applications a few times before the adl file freezes and I need to force quit to get out. Well, seeing that I had never messed around with creating a Flex Project, I decided to give it a whirl and learn to put my code into MXML and go from there. In doing this, I discovered I no longer had the adl freeze issue!<br />
<span id="more-194"></span><br />
Since I'm currently working on <a href="http://www.kontain.com/skittle/entries/68436/generator---air-application/" target="_blank">Generator</a> in my spare time, I decided to create one of those test files in a Flex Project. This was the result:<br />
<img class="alignnone size-full wp-image-195" title="FileDrag_01" src="http://blog.tomorrowevening.com/content/2010/03/FileDrag_01.jpg" alt="" width="510" height="407" /><br />
<img class="alignnone size-full wp-image-196" title="FileDrag_02" src="http://blog.tomorrowevening.com/content/2010/03/FileDrag_02.jpg" alt="" width="510" height="407" /><br />
<img class="alignnone size-full wp-image-197" title="FileDrag_03" src="http://blog.tomorrowevening.com/content/2010/03/FileDrag_03.jpg" alt="" width="510" height="407" /></p>
<p>You can download the source <a href="http://blog.tomorrowevening.com/content/2010/03/ClassDrag.mxml" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.tomorrowevening.com/flex/file-drag/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
