<?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>Dirty Motherfucking Blog &#187; flex sdk</title>
	<atom:link href="http://www.dirty-motherfucker.org/blog/tag/flex-sdk/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dirty-motherfucker.org/blog</link>
	<description>All kinds of shit</description>
	<lastBuildDate>Tue, 17 Aug 2010 18:19:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1-alpha</generator>
		<item>
		<title>Updated Processing works</title>
		<link>http://www.dirty-motherfucker.org/blog/2008/05/26/updated-processing-works/</link>
		<comments>http://www.dirty-motherfucker.org/blog/2008/05/26/updated-processing-works/#comments</comments>
		<pubDate>Mon, 26 May 2008 13:54:14 +0000</pubDate>
		<dc:creator>gencha</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[processing]]></category>
		<category><![CDATA[flex sdk]]></category>

		<guid isPermaLink="false">http://dirty-motherfucker.org/blog/?p=91</guid>
		<description><![CDATA[I updated all the processing works to use a more common code base. Additionally i added start/stop functionality to the small versions displayed directly in the blog. I also fixed a few minor (and some major) issues in the Sand Traveler project. In the original code you will find the following line: float tinc = [...]]]></description>
			<content:encoded><![CDATA[<p>I updated all the processing works to use a more common code base. Additionally i added start/stop functionality to the small versions displayed directly in the blog.<br />
I also fixed a few minor (and some major) issues in the Sand Traveler project.<br />
In the original code you will find the following line:</p>
<p><code>float tinc = ot+(1.1-t/num)*2*t*TWO_PI/num;</code></p>
<p>which i ported to:</p>
<p><code>var tinc:Number = ot + ( 1.1 - cityIdx / NUM_CITIES ) * 2 * cityIdx * MathHelper.TWO_PI / NUM_CITIES;</code></p>
<p>Now cityIdx (t) and NUM_CITIES (num) are both integers. Java (Processing) will correctly do the integer division (which always results in 0). Thus the whole term &#8220;(1.1-t/num)&#8221; always equals 1.1.<br />
Now the Flex compiler has a different opinion on how this should be evaluated. The presence of 1.1 makes it cast cityIdx and NUM_CITIES to Number as well.</p>
<p>This whole drama led to further errors in the original port. You can grab the fixed source from <a href="svn://dirty-motherfucker.org:8888/processing/trunk">svn://dirty-motherfucker.org:8888/processing/trunk</a></p>
<p>Here are the new stand alone versions:<br />
<a href="http://dirty-motherfucker.org/blog/wp-content/uploads/2008/05/buddahbrotas3_1024.swf">Buddahbrot</a><br />
<a href="http://dirty-motherfucker.org/blog/wp-content/uploads/2008/05/happyplaceas3_9001.swf">Happy Place</a><br />
<a href="http://dirty-motherfucker.org/blog/wp-content/uploads/2008/05/sandtravelleras3_1024.swf">Sand Traveler</a><br />
<a href="http://dirty-motherfucker.org/blog/wp-content/uploads/2008/05/substrateas3_7201.swf">Substrate</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dirty-motherfucker.org/blog/2008/05/26/updated-processing-works/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Compiling SWC Libraries &#8211; Part 2</title>
		<link>http://www.dirty-motherfucker.org/blog/2008/05/08/compiling-swc-libraries-part-2/</link>
		<comments>http://www.dirty-motherfucker.org/blog/2008/05/08/compiling-swc-libraries-part-2/#comments</comments>
		<pubDate>Thu, 08 May 2008 20:54:45 +0000</pubDate>
		<dc:creator>gencha</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[flashdevelop]]></category>
		<category><![CDATA[flex sdk]]></category>
		<category><![CDATA[swc]]></category>

		<guid isPermaLink="false">http://dirty-motherfucker.org/blog/?p=29</guid>
		<description><![CDATA[dragonworx, a user from the FlashDevelop message board took the time to write an SWC compilation plug-in for FlashDevelop. So, if you&#8217;re a FlashDevelop user and you&#8217;re looking to compile an SWC library you should definitely have a look at this. http://www.flashdevelop.org/community/viewtopic.php?t=2987 I personally have not yet put it to use as i am waiting [...]]]></description>
			<content:encoded><![CDATA[<p>dragonworx, a user from the FlashDevelop message board took the time to write an SWC compilation plug-in for FlashDevelop.<br />
So, if you&#8217;re a FlashDevelop user and you&#8217;re looking to compile an SWC library you should definitely have a look at this.</p>
<p>http://www.flashdevelop.org/community/viewtopic.php?t=2987</p>
<p>I personally have not yet put it to use as i am waiting until solutions are implemented in FlashDevelop and i can build all my crap in one go. Until then i still go for my .bat approach.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dirty-motherfucker.org/blog/2008/05/08/compiling-swc-libraries-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building an SWC library using the Flex 3 SDK</title>
		<link>http://www.dirty-motherfucker.org/blog/2008/02/20/building-an-swc-library-using-the-flex-3-sdk/</link>
		<comments>http://www.dirty-motherfucker.org/blog/2008/02/20/building-an-swc-library-using-the-flex-3-sdk/#comments</comments>
		<pubDate>Wed, 20 Feb 2008 22:18:20 +0000</pubDate>
		<dc:creator>gencha</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[aswing]]></category>
		<category><![CDATA[flex sdk]]></category>
		<category><![CDATA[swc]]></category>

		<guid isPermaLink="false">http://dirty-motherfucker.org/blog/?p=25</guid>
		<description><![CDATA[So the other day i was trying to build the AsWing library with the Flex SDK. Sadly, i failed miserably. I didn&#8217;t even know where to start. How do you feed all the files into the compiler? What command line switches to use? So after reading basically every piece of documentation that Adobe has to [...]]]></description>
			<content:encoded><![CDATA[<p>So the other day i was trying to build the AsWing library with the Flex SDK. Sadly, i failed miserably. I didn&#8217;t even know where to start. How do you feed all the files into the compiler? What command line switches to use? So after reading basically every piece of documentation that Adobe has to offer, i finally pieced it together.</p>
<p>And now i can proudly say, that wasn&#8217;t so hard after all, was it?<br />
Alright, enough with the prologue. If you&#8217;re interested in the topic of build an SWC with the SDK you most likely know that you have to feed all the libraries classes into it using a manifest file. But in the case of AsWing, there are like a million files to add (give or take). So i wrote myself a handy script real quick:</p>
<pre class="brush: jscript;">var fso = new ActiveXObject( &quot;Scripting.FileSystemObject&quot; );
var manifest = fso.createTextFile( &quot;src\\manifest.xml&quot;, true );

manifest.writeLine( &quot;&lt;?xml version=\&quot;1.0\&quot;?&gt;&quot; );
manifest.writeLine( &quot;&lt;componentPackage&gt;&quot; );

var src = fso.getFolder( &quot;src&quot; );
listFolder( src, manifest, &quot;&quot; );

manifest.writeLine( &quot;&lt;/componentPackage&gt;&quot; );

manifest.close();

function listFolder( source, target, package ) {
	for( var items = new Enumerator( source.SubFolders ); !items.atEnd(); items.moveNext() ) {
		var currentFolder = items.item();
		listFolder( currentFolder, target, package + currentFolder.name + &quot;.&quot; );
	}

	for( var files = new Enumerator( source.files ); !files.atEnd(); files.moveNext() ) {
		var currentFile = files.item();
		if( String( currentFile.name ).match( &quot;\.as$&quot; ) ) {
			var component = String( currentFile.name ).replace( &quot;\.as&quot;, &quot;&quot; );
			target.writeLine( &quot;\t&lt;component id=\&quot;&quot; + component + &quot;\&quot; class=\&quot;&quot; + package + component + &quot;\&quot;/&gt;&quot; );
		}
	}
}</pre>
<p>So, that bad boy will build you the manifest for the given folder. I named this guy configure.js and placed it in the AsWing folder.<br />
Now for slightly easier calling i added a small .bat to go with that. There&#8217;s only one line that matters and it is: <b>wscript.exe configure.js</b></p>
<p>So far so good. Now we&#8217;re only missing the actual building (i&#8217;m hiliting this as JavaScript, but it&#8217;s only a .bat ;P):</p>
<pre class="brush: jscript;">
@echo off

set flex_sdk_dir=path_to_flex_sdk

if (%flex_sdk_dir%) == (path_to_flex_sdk) goto sdk_missing
if (%flex_sdk_dir%) == () goto sdk_missing
if not exist %flex_sdk_dir% goto sdk_missing

if not exist src\manifest.xml goto manifest_missing

goto make

:manifest_missing
echo You have to run configure.bat first.
goto end

:sdk_missing
echo You have to set the path to the Flex SDK inside &quot;%0.bat&quot;.
goto end

:make
echo Making...

if not exist bin md bin
set compc=%flex_sdk_dir%\bin\compc.exe
%compc% -source-path src -output bin\AsWing.swc -namespace http://aswing.org src\manifest.xml -include-namespaces http://aswing.org 

:end
echo Done.
</pre>
<p>That should be it ;) I also added these scripts to the AsWing repository.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dirty-motherfucker.org/blog/2008/02/20/building-an-swc-library-using-the-flex-3-sdk/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>
