<?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; actionscript</title>
	<atom:link href="http://dirty-motherfucker.org/blog/tag/actionscript/feed/" rel="self" type="application/rss+xml" />
	<link>http://dirty-motherfucker.org/blog</link>
	<description>All kinds of shit</description>
	<lastBuildDate>Wed, 09 May 2012 12:49:30 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4-beta4-20750</generator>
		<item>
		<title>Substrate in 25 lines</title>
		<link>http://dirty-motherfucker.org/blog/2008/12/15/substrate-in-25-lines/</link>
		<comments>http://dirty-motherfucker.org/blog/2008/12/15/substrate-in-25-lines/#comments</comments>
		<pubDate>Mon, 15 Dec 2008 20:32:54 +0000</pubDate>
		<dc:creator>gencha</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[processing]]></category>
		<category><![CDATA[jared tarbell]]></category>

		<guid isPermaLink="false">http://www.dirty-motherfucker.org/blog/?p=206</guid>
		<description><![CDATA[As soon as I heard of the 25-Line ActionScript Contest I knew I&#8217;d have to take part. So I tried re-implementing Substrate in 25 lines. I ended up with a pretty limited version but it runs fine and looks nice. But, oh well, I didn&#8217;t make the finals :( And I don&#8217;t plan on entering [...]]]></description>
			<content:encoded><![CDATA[<p>As soon as I heard of the <a href="http://25lines.com">25-Line ActionScript Contest</a> I knew I&#8217;d have to take part. So I tried re-implementing <a href="http://www.dirty-motherfucker.org/blog/2008/05/13/substrate-in-as3/">Substrate</a> in 25 lines. I ended up with a pretty limited version but it runs fine and looks nice.</p>
<p>But, oh well, I didn&#8217;t make the finals :( And I don&#8217;t plan on entering it again. Although after seeing the source of the finalists I assume I would even be able to add more features. Which would be using techniques that I assumed were frowned upon ;)</p>
<p>So, because of the length of some lines, no code in this post, only a link to the <a href='http://www.dirty-motherfucker.org/blog/wp-content/uploads/2008/12/25lines.txt'>source</a>.<br />
And this is the resulting <a href='http://www.dirty-motherfucker.org/blog/wp-content/uploads/2008/12/25lines.swf'>swf file</a>.</p>
<p>I hope someone gets something out of this, cause I sure didn&#8217;t :D</p>
]]></content:encoded>
			<wfw:commentRss>http://dirty-motherfucker.org/blog/2008/12/15/substrate-in-25-lines/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Furry Blog Logo</title>
		<link>http://dirty-motherfucker.org/blog/2008/11/13/furry-blog-logo/</link>
		<comments>http://dirty-motherfucker.org/blog/2008/11/13/furry-blog-logo/#comments</comments>
		<pubDate>Thu, 13 Nov 2008 00:20:39 +0000</pubDate>
		<dc:creator>gencha</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[graffiti]]></category>

		<guid isPermaLink="false">http://www.dirty-motherfucker.org/blog/?p=186</guid>
		<description><![CDATA[Update: I updated the .swf files. So hopefully now those pesky Flash Player errors are gone :( Shame on me for bad coding. I had a little fun with particles in AS3 the past days. I wrote a small piece based on my Processing port framework that traces the paths of particles. The particles pick [...]]]></description>
			<content:encoded><![CDATA[<p>Update: I updated the .swf files. So hopefully now those pesky Flash Player errors are gone :( Shame on me for bad coding.</p>
<p>I had a little fun with particles in AS3 the past days. I wrote a small piece based on my Processing port framework that traces the paths of particles. The particles pick up color from a given input texture. As they move, they plot their color onto the canvas. Although i added the condition that the color is only plotted if the target pixel is darker than the particle color. This results in a nice glowing effect around the outline of the image.<br />
I built the swf files against Flash Player 10 this time. There is actually no need at all to do so, but i just couldn&#8217;t resist Vector<T>. Arrays are so dirty :(</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_tracer_small_1783808207"
			class="flashmovie"
			width="466"
			height="220">
	<param name="movie" value="http://www.dirty-motherfucker.org/blog/wp-content/uploads/2008/11/tracer_small.swf" />
	<param name="play" value="false" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.dirty-motherfucker.org/blog/wp-content/uploads/2008/11/tracer_small.swf"
			name="fm_tracer_small_1783808207"
			width="466"
			height="220">
		<param name="play" value="false" />
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p>Here is the <a href="http://www.dirty-motherfucker.org/blog/wp-content/uploads/2008/11/tracer_large.swf">larger version</a> with the complete blog logo. ;)</p>
<p>And here&#8217;s some source to go with it. Although it&#8217;ll hardly compile outside of the Processing Port framework ;D But since i moved servers my SVN repository isn&#8217;t publicly available anymore. So if anyone has any interest in the complete source, i&#8217;ll wrap it up and put it online ;)</p>
<p>Particle.as</p>
<pre class="brush: as3; title: ; notranslate">
package org.dirty_dirtymotherfucker.tracer {
  import flash.display.BitmapData;
  import flash.geom.Point;
  import flash.geom.Rectangle;
  import org.dirty_dirtymotherfucker.processing.*;
  
  public class Particle {
    
    public var position_x:Number;
    public var position_y:Number;
    public var direction_x:Number;
    public var direction_y:Number;
    public var color:uint;
    public var life:Number;
    public var source:BitmapData;
    public var randomSource:BitmapData;
    
    public function Particle( source:BitmapData, randomSource:BitmapData, sourceOffset:uint ) {
      this.source = source;
      if( Tracer.USE_PERLIN_NOISE ) {
        this.randomSource = new BitmapData( randomSource.width, 1, false );
        this.randomSource.copyPixels( randomSource, new Rectangle( 0, sourceOffset, randomSource.width, 1 ), new Point( 0, 0 ) );
      }
      birth();
    }
    
    public function birth( ):void {
      life        = Tracer.MAX_PARTICLE_LIFE;
      position_x  = MathHelper.randomRange( -Tracer.CANVAS_SIZE_X, Tracer.CANVAS_SIZE_X );
      position_y  = MathHelper.randomRange( -Tracer.CANVAS_SIZE_Y, Tracer.CANVAS_SIZE_Y );
      direction_x = MathHelper.randomRange( -1.0, 1.0 );
      direction_y = MathHelper.randomRange( -1.0, 1.0 );
      color       = source.getPixel32( position_x, position_y );
    }
    
    public function travel( source:BitmapData, canvas:BitmapData, blend:Number ):void {
      if( Tracer.USE_PERLIN_NOISE ) {
        direction_x += ( ColorHelper.getR( randomSource.getPixel( life * 10, 0 ) ) - 128 ) / 256;
        direction_y += ( ColorHelper.getG( randomSource.getPixel( life * 10, 0 ) ) - 128 ) / 256;
      } else {
        direction_x += MathHelper.randomRange( -0.1, 0.1 );
        direction_y += MathHelper.randomRange( -0.1, 0.1 );
      }
      
      // normalize direction
      var len:Number = Math.sqrt( direction_x * direction_x + direction_y * direction_y );
      direction_x /= len;
      direction_y /= len;
      
      position_x += direction_x;
      position_y += direction_y;
      life -= 0.1;
      //if( 0 == color ) life = 0;
      
      var sourceColor:uint = source.getPixel32( position_x, position_y );
      var canvasColor:uint = canvas.getPixel32( position_x, position_y );
      
      if( sourceColor != canvasColor ) {
        color = ColorHelper.blend( color, sourceColor, blend );
      
        var colorFit:Boolean = ColorHelper.getR( ColorHelper.toGrayScale( color ) ) &gt; ColorHelper.getR( ColorHelper.toGrayScale( canvasColor ) );
        if( 0 != ColorHelper.getA( color ) &amp;&amp; colorFit ) {
          canvas.setPixel32( position_x, position_y, ColorHelper.blend( color, canvasColor, 25 ) );
          //canvas.setPixel32( position.x, position.y, color );
        }
      }
      
      if( 0 &gt; position_x || position_x &gt; Tracer.CANVAS_SIZE_X || 0 &gt; position_y || position_y &gt; Tracer.CANVAS_SIZE_Y || 0 &gt;= life ) birth();
    }
    
  }
  
}
</pre>
<p>Tracer.as</p>
<pre class="brush: as3; title: ; notranslate">
package org.dirty_dirtymotherfucker.tracer {
  
  import flash.display.*;
  import flash.events.*;
  import flash.geom.Matrix;
  import flash.geom.Point;
  import flash.geom.Rectangle;
  import flash.net.URLLoader;
  import flash.net.URLRequest;
  
  import org.dirty_dirtymotherfucker.processing.*;
  
  /**
   * The main implementation of the Tracer project
   */
  public class Tracer extends BlogSprite {
    
    // Main application settings
    
    public static const CANVAS_BACKGROUND_COLOR:uint  = 0xFF000000;
    
    public static const UPDATES_PER_SECOND:uint       = 1200;
    
    public static const ITERATIONS_PER_UPDATE:uint    = 10;
    
    public static const CANVAS_SIZE_X:uint            = 466;// 840;
    public static const CANVAS_SIZE_Y:uint            = 220;
    
    public static const ADDITIVE_BLENDING:Boolean     = true;
    public static const SUBTRACTIVE_BLENDING:Boolean  = false;
    private static const MAX_ITERATIONS:uint          = 0;// 120 * 20;
    
    public static const MAX_PARTICLE_LIFE:Number      = 100;
    public static const NUM_PARTICLES:int             = 1000;
    
    public static const USE_PERLIN_NOISE:Boolean      = false;
    
    private var iterationCount:int = 0;
    
    private var loader:Loader;
    private var source:BitmapData;
    private var randomSeed:BitmapData;
    
    private var particles:Vector.&lt;Particle&gt;;
    
    private var blend:Number;
    
    public function Tracer():void {
      ColorHelper.loadPalette( );
      
      super( CANVAS_SIZE_X, CANVAS_SIZE_Y, CANVAS_BACKGROUND_COLOR );
      
      loader = new Loader();
      //loader.load( new URLRequest( &quot;map.png&quot; ) );
      loader.load( new URLRequest( &quot;http://www.dirty-motherfucker.org/blog/wp-content/uploads/2008/11/motherfucking.png&quot; ) );
      
      loader.contentLoaderInfo.addEventListener( Event.COMPLETE, drawMap );
    }
    
    override protected function onDraw( event:TimerEvent ):void {
      canvas.lock();
      for( var iteration:uint = 0; iteration &lt; ITERATIONS_PER_UPDATE; ++iteration ) {
        // draw
        if( null == loader.content ) break;
        for each( var particle:Particle in particles ) {
          particle.travel( source, canvas, blend );
        }
        
        blend += 0.06;
        if( blend &gt;= 255 ) stopApp();
        
        // cycle limiter
        if( MAX_ITERATIONS &gt; 0 &amp;&amp; ++iterationCount &gt; MAX_ITERATIONS ) {
          restart();
        }
      }
      canvas.unlock();

    }
    
    override protected function startApp( updatesPerSecond:uint = 0 ):void {
      super.startApp( UPDATES_PER_SECOND );
      
      particles = new Vector.&lt;Particle&gt;();
      
      blend = 10;
      
      iterationCount = 0;
      
      canvas.fillRect( new Rectangle( 0, 0, CANVAS_SIZE_X, CANVAS_SIZE_Y ), CANVAS_BACKGROUND_COLOR );
      
      initContent();
    }
    
    private function drawMap( e:Event ):void {
      loader.removeEventListener( Event.COMPLETE, drawMap );
      
      initContent();
    }
    
    private function initContent():void {
      if( null == loader ) return;
      source = new BitmapData( CANVAS_SIZE_X, CANVAS_SIZE_Y, true, 0x00000000 );
      var matrix:Matrix = new Matrix();
      matrix.translate( 0, CANVAS_SIZE_Y / 2 - loader.height / 2 );
      source.draw( loader, matrix );
      
      if( USE_PERLIN_NOISE ) {
        randomSeed = new BitmapData( MAX_PARTICLE_LIFE * 10, NUM_PARTICLES, false, 0x000000 );
        randomSeed.perlinNoise( MAX_PARTICLE_LIFE * 10, NUM_PARTICLES, 8, Math.random() * uint.MAX_VALUE, true, true, BitmapDataChannel.GREEN | BitmapDataChannel.RED, false );
      }
      
      for( var i:uint = 0; i &lt; NUM_PARTICLES; ++i ) {
        particles.push( new Particle( source, randomSeed, i ) );
      }
      
    }

  }
  
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://dirty-motherfucker.org/blog/2008/11/13/furry-blog-logo/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Converting SWF animations to video</title>
		<link>http://dirty-motherfucker.org/blog/2008/10/14/converting-swf-animtions-to-video/</link>
		<comments>http://dirty-motherfucker.org/blog/2008/10/14/converting-swf-animtions-to-video/#comments</comments>
		<pubDate>Tue, 14 Oct 2008 09:25:54 +0000</pubDate>
		<dc:creator>gencha</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[aswing]]></category>
		<category><![CDATA[flashdevelop]]></category>
		<category><![CDATA[swfstudio]]></category>
		<category><![CDATA[air]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://dirty-motherfucker.org/blog/?p=151</guid>
		<description><![CDATA[If you ever tried to convert a SWF animation to a video you know what a pain it can be. Let&#8217;s first look at the solutions at hand: Exporting a movie from Flash Using a SWF to movie converter Screen capture Now let&#8217;s break those down. Exporting a movie from Flash - Doesn&#8217;t play sub-movieclip [...]]]></description>
			<content:encoded><![CDATA[<p>If you ever tried to convert a SWF animation to a video you know what a pain it can be. Let&#8217;s first look at the solutions at hand:</p>
<ul>
<li>Exporting a movie from Flash</li>
<li>Using a SWF to movie converter</li>
<li>Screen capture</li>
</ul>
<p>Now let&#8217;s break those down.</p>
<ul>
<li>Exporting a movie from Flash<br />
- Doesn&#8217;t play sub-movieclip animations</li>
<li>Using a SWF to video converter<br />
- Some have limited encoding support<br />
- Some have really bad encoding quality<br />
- Some have poor playback performance and the result looks shitty<br />
- Some also don&#8217;t play sub-movieclip animations</li>
<li>Screen capture<br />
- Suffers from the same encoding and playback problems as converters</li>
</ul>
<p>So, after trying all of the above on a project at hand i was rather disappointed to see that all the solution i tried were basically shit. The animation at hand had 1024&#215;768 dimensions and only in Flash player 10 it played with reasonable speed. So when i added screen capture into the mix the result looked like crap.</p>
<p>So i rolled my own converter. And the goals were clear:</p>
<ul>
<li>I want to capture every single frame of the animation</li>
<li>I want the highest quality possible</li>
<li>I want to use the vector scaling of flash to achieve my target size to avoid bitmap scaling later on in the process.</li>
</ul>
<p>Now what i ended up with is a converter that just writes out every single frame as PNG, no sound, no direct video. But capturing the sound is extremely easy and so is converting a PNG sequence into a movie.</p>
<p>So here is how it&#8217;s done.<br />
At first i tried to gotoAndStop( ++frame ); in a loop and writing out the frames, but this results in sub-movieclip animations not being played back.<br />
So what you have to do is just play the movie. But you place a listener on it for Event.ENTER_FRAME. If your host application runs at the same frame rate you can also place the listener on the host application (which is what I&#8217;ve done in my reference implementation).</p>
<p>Now in the event listener you just .draw into a BitmapData object, encode it to PNG (using the AsPngEncoder from the AsWing project for example) and then write it to disk.<br />
And this is where you get problems. Cause Flash itself won&#8217;t let you write to disk. I had 2 solutions to that problem. I used SWFStudio to compile a .exe that could write binaries to disk and i wrote one version in AIR.</p>
<p>Feel free to look at both implementations, but keep in mind that they are basically proof-of-concept, look like shit and are almost unuseable.</p>
<p>The SWFStudio version expects the name of the swf as the first command-line parameter (which can&#8217;t include spaces). The second and third parameter are the width and height. The last parameter is the number of frames to write.</p>
<p>The AIR version includes a GUI to set the input movie and output folder.</p>
<p>Have fun!</p>
<p><a href="http://dirty-motherfucker.org/blog/wp-content/uploads/2008/10/swf2videoconverter.zip">SWFStudio Version</a><br />
<a href="http://dirty-motherfucker.org/blog/wp-content/uploads/2008/10/swf2videoconverterair.zip">Adobe AIR Version</a></p>
]]></content:encoded>
			<wfw:commentRss>http://dirty-motherfucker.org/blog/2008/10/14/converting-swf-animtions-to-video/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Supernova</title>
		<link>http://dirty-motherfucker.org/blog/2008/08/18/supernova/</link>
		<comments>http://dirty-motherfucker.org/blog/2008/08/18/supernova/#comments</comments>
		<pubDate>Mon, 18 Aug 2008 18:42:37 +0000</pubDate>
		<dc:creator>gencha</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[processing]]></category>
		<category><![CDATA[jared tarbell]]></category>

		<guid isPermaLink="false">http://dirty-motherfucker.org/blog/?p=133</guid>
		<description><![CDATA[While working on a reference implementation in Actionscript for a demo effect, I accidentally ended up with this beauty. It&#8217;s based on the lovely City Traveler algorithm by Jared Tarbell with only a few minor adjustments actually. I thought I&#8217;d share nevertheless :) Be sure to stop it at some point, otherwise it will go [...]]]></description>
			<content:encoded><![CDATA[<p>While working on a reference implementation in Actionscript for a demo effect, I accidentally ended up with this beauty. It&#8217;s based on the lovely City Traveler algorithm by Jared Tarbell with only a few minor adjustments actually. I thought I&#8217;d share nevertheless :) Be sure to stop it at some point, otherwise it will go on and on forever, eating up you cpu time.</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_supernova_512_1518661269"
			class="flashmovie"
			width="512"
			height="512">
	<param name="movie" value="http://dirty-motherfucker.org/blog/wp-content/uploads/2008/08/supernova_512.swf" />
	<param name="play" value="false" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://dirty-motherfucker.org/blog/wp-content/uploads/2008/08/supernova_512.swf"
			name="fm_supernova_512_1518661269"
			width="512"
			height="512">
		<param name="play" value="false" />
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p>As always, I also provide a <a href="http://dirty-motherfucker.org/blog/wp-content/uploads/2008/08/supernova_1024.swf">larger version</a>.</p>
<p>You can also dig out the source from the Processing repository, but it&#8217;s now buried under the more recent revision of the effect i was actually going for. So if you&#8217;re interested, better drop me a line ;)</p>
]]></content:encoded>
			<wfw:commentRss>http://dirty-motherfucker.org/blog/2008/08/18/supernova/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>PureMVC file templates for FlashDevelop</title>
		<link>http://dirty-motherfucker.org/blog/2008/06/20/puremvc-file-templates-for-flashdevelop/</link>
		<comments>http://dirty-motherfucker.org/blog/2008/06/20/puremvc-file-templates-for-flashdevelop/#comments</comments>
		<pubDate>Fri, 20 Jun 2008 11:23:25 +0000</pubDate>
		<dc:creator>gencha</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[flashdevelop]]></category>
		<category><![CDATA[puremvc]]></category>

		<guid isPermaLink="false">http://dirty-motherfucker.org/blog/?p=122</guid>
		<description><![CDATA[I wrote 3 small file templates for the AS3Project in FlashDevelop. They come in quite handy when working on a PureMVC based project. PureMVC-Command.as.fdt PureMVC-Mediator.as.fdt PureMVC-Proxy.as.fdt I hope it helps someone ;)]]></description>
			<content:encoded><![CDATA[<p>I wrote 3 small file templates for the AS3Project in FlashDevelop.<br />
They come in quite handy when working on a PureMVC based project.</p>
<p><a href="http://dirty-motherfucker.org/blog/wp-content/uploads/2008/06/PureMVC-Command.as.fdt">PureMVC-Command.as.fdt</a><br />
<a href="http://dirty-motherfucker.org/blog/wp-content/uploads/2008/06/PureMVC-Mediator.as.fdt">PureMVC-Mediator.as.fdt</a><br />
<a href="http://dirty-motherfucker.org/blog/wp-content/uploads/2008/06/PureMVC-Proxy.as.fdt">PureMVC-Proxy.as.fdt</a></p>
<p>I hope it helps someone ;)</p>
]]></content:encoded>
			<wfw:commentRss>http://dirty-motherfucker.org/blog/2008/06/20/puremvc-file-templates-for-flashdevelop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quickly generating AsDoc</title>
		<link>http://dirty-motherfucker.org/blog/2008/06/17/quickly-generating-asdoc/</link>
		<comments>http://dirty-motherfucker.org/blog/2008/06/17/quickly-generating-asdoc/#comments</comments>
		<pubDate>Tue, 17 Jun 2008 09:44:06 +0000</pubDate>
		<dc:creator>gencha</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[aswing]]></category>

		<guid isPermaLink="false">http://dirty-motherfucker.org/blog/?p=109</guid>
		<description><![CDATA[For ease of use i have a small batch file to generate the documentation for my ActionScript projects. It&#8217;s definitely nothing special, but if you struggle with the asdoc syntax and you just want a quick solution, here it is: It also points asdoc to the bin directory of AsWing, where it will find the [...]]]></description>
			<content:encoded><![CDATA[<p>For ease of use i have a small batch file to generate the documentation for my ActionScript projects. It&#8217;s definitely nothing special, but if you struggle with the asdoc syntax and you just want a quick solution, here it is:</p>
<pre class="brush: plain; title: ; notranslate">
@echo off

set asdoc_bin=&quot;E:\projects\flex_sdk_3\bin\asdoc.exe&quot;
set aswing_path=&quot;E:\projects\aswing\trunk\AsWing\bin&quot;

%asdoc_bin% -doc-sources org\dirty_motherfucker\. -main-title &quot;My ActionScript Project&quot; -output &quot;doc&quot; -compiler.library-path %aswing_path%

pause
</pre>
<p>It also points asdoc to the bin directory of AsWing, where it will find the .swc files needed so it can fully understand each part of the sources in my namespace.<br />
If you use several libraries, you will have to supply the library paths as well.</p>
<p>Now, let&#8217;s say you don&#8217;t have every library available as .swc and you also don&#8217;t feel like compiling one. Then you&#8217;d use -compiler.source-path. Here is an example of a project that uses more libraries.</p>
<pre class="brush: plain; title: ; notranslate">
@echo off

set asdoc_bin=&quot;E:\projects\flex_sdk_3\bin\asdoc.exe&quot;
set aswing_path=&quot;E:\projects\aswing\trunk\AsWing\bin&quot;
set aswingkit_path=&quot;E:\projects\AsWingKit\src&quot;
set puremvc_path=&quot;E:\projects\PureMVC\src&quot;
set tweenlite_path=&quot;E:\projects\TweenFilterLiteAS3&quot;

%asdoc_bin% -doc-sources src\org\dirty_motherfucker -main-title &quot;Content Delivery Framework&quot; -output &quot;doc&quot; -compiler.library-path %aswing_path% -compiler.source-path %puremvc_path% %aswingkit_path% %tweenlite_path% src\ -warnings

pause
</pre>
<p>Also, note in this second example that i include src\ in the source paths. I only generate the documentation for the files in my namespace, but those use source file which reside in the same project directory, thus you should include the whole source directory to make sure everything runs smoothly.</p>
]]></content:encoded>
			<wfw:commentRss>http://dirty-motherfucker.org/blog/2008/06/17/quickly-generating-asdoc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updated Processing works</title>
		<link>http://dirty-motherfucker.org/blog/2008/05/26/updated-processing-works/</link>
		<comments>http://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://dirty-motherfucker.org/blog/2008/05/26/updated-processing-works/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BuddahBrot in AS3</title>
		<link>http://dirty-motherfucker.org/blog/2008/05/22/buddahbrot-in-as3/</link>
		<comments>http://dirty-motherfucker.org/blog/2008/05/22/buddahbrot-in-as3/#comments</comments>
		<pubDate>Thu, 22 May 2008 00:47:21 +0000</pubDate>
		<dc:creator>gencha</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[processing]]></category>
		<category><![CDATA[jared tarbell]]></category>

		<guid isPermaLink="false">http://dirty-motherfucker.org/blog/?p=76</guid>
		<description><![CDATA[2008-05-26: I fixed some parts of this port. For further details check the updated works post. For this one i have to credit quite a few people. As always, i started out with the Processing source by Jared Tarbell. He based his code on an implementation by Paul Bourke, who based his work on a [...]]]></description>
			<content:encoded><![CDATA[<p>2008-05-26: I fixed some parts of this port. For further details check <a href="http://dirty-motherfucker.org/blog/2008/05/26/updated-processing-works/">the updated works post</a>.</p>
<p>For this one i have to credit quite a few people.<br />
As always, i started out with the Processing source by Jared Tarbell. He based his code on an implementation by <a href="http://astronomy.swin.edu.au/%7Epbourke/">Paul Bourke</a>, who based his work on a technique invented by <a href="http://www.superliminal.com/fractals/bbrot/bbrot.htm">Melinda  Green</a>.</p>
<p>It&#8217;s pretty much a straight ahead port of Tarbell&#8217;s code. Nothing to say about it. Click it to activate it. This is the version with a bailout value of 20 (nice looking results fast).<br />

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_buddahbrotas3_512_1031456598"
			class="flashmovie"
			width="512"
			height="512">
	<param name="movie" value="http://dirty-motherfucker.org/blog/wp-content/uploads/2008/05/buddahbrotas3_512.swf" />
	<param name="play" value="false" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://dirty-motherfucker.org/blog/wp-content/uploads/2008/05/buddahbrotas3_512.swf"
			name="fm_buddahbrotas3_512_1031456598"
			width="512"
			height="512">
		<param name="play" value="false" />
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p>I didn&#8217;t package up a .zip with the source. But you can get the latest versions of all my processing ports from: <a href="svn://dirty-motherfucker.org:8888/processing/trunk">svn://dirty-motherfucker.org:8888/processing/trunk</a><br />
I also changed some of the other ports in the meanwhile. Some small bugs slipped in the versions i uploaded to the blog. So if you&#8217;re interested, be sure to grab the latest sources from the repository.</p>
]]></content:encoded>
			<wfw:commentRss>http://dirty-motherfucker.org/blog/2008/05/22/buddahbrot-in-as3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Jared Tarbell&#8217;s &#8220;Sand Traveller&#8221; in AS3</title>
		<link>http://dirty-motherfucker.org/blog/2008/05/22/jared-tarbells-sand-traveller-in-as3/</link>
		<comments>http://dirty-motherfucker.org/blog/2008/05/22/jared-tarbells-sand-traveller-in-as3/#comments</comments>
		<pubDate>Thu, 22 May 2008 00:36:31 +0000</pubDate>
		<dc:creator>gencha</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[processing]]></category>
		<category><![CDATA[jared tarbell]]></category>

		<guid isPermaLink="false">http://dirty-motherfucker.org/blog/?p=70</guid>
		<description><![CDATA[2008-05-26: I fixed some parts of this port. For further details check the updated works post. I saved one of my favorites by Jared Tarbell&#8217;s for now. The algorithm amazed me almost as much as Substrate did, but when i decided to port Tarbell&#8217;s works i knew i could put a little sugar into this [...]]]></description>
			<content:encoded><![CDATA[<p>2008-05-26: I fixed some parts of this port. For further details check <a href="http://dirty-motherfucker.org/blog/2008/05/26/updated-processing-works/">the updated works post</a>.</p>
<p>I saved one of my favorites by <a href="http://www.complexification.net/">Jared Tarbell&#8217;s</a> for now. The algorithm amazed me almost as much as Substrate did, but when i decided to port Tarbell&#8217;s works i knew i could put a little sugar into this one.</p>
<p>I started converting it straight ahead but i also added new blending modes. This implementation is basically Tarbell&#8217;s <a href="http://complexification.net/gallery/machines/sandTraveler/index.php">third variation of the original implementation</a>. I made it so that the traveler&#8217;s sandpainters will either pick additive or subtractive blending. This leads to some <a href="http://dirty-motherfucker.org/blog/wp-content/uploads/2008/05/sandtravelleras3.swf">pretty nice results</a>.</p>
<p>I didn&#8217;t add a smaller version inside this post as it needs some time to develop and it also needs a certain size so you can fully appreciate it. So please check out the <a href="http://dirty-motherfucker.org/blog/wp-content/uploads/2008/05/sandtravelleras3.swf">large version</a> (1000&#215;1000).</p>
<p>Be sure to also grab the <a href="http://dirty-motherfucker.org/blog/wp-content/uploads/2008/05/sandtravelleras3.zip">source</a>  and check out <a href="http://complexification.net/gallery/machines/sandTraveler/index.php">the originals by Tarbell</a>.</p>
<p>I also added a preview version:<br />

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_sandtravelleras3_512_1539494726"
			class="flashmovie"
			width="512"
			height="512">
	<param name="movie" value="http://dirty-motherfucker.org/blog/wp-content/uploads/2008/05/sandtravelleras3_512.swf" />
	<param name="play" value="false" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://dirty-motherfucker.org/blog/wp-content/uploads/2008/05/sandtravelleras3_512.swf"
			name="fm_sandtravelleras3_512_1539494726"
			width="512"
			height="512">
		<param name="play" value="false" />
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
]]></content:encoded>
			<wfw:commentRss>http://dirty-motherfucker.org/blog/2008/05/22/jared-tarbells-sand-traveller-in-as3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Jared Tarbell&#8217;s &#8220;Happy Place&#8221; in AS3</title>
		<link>http://dirty-motherfucker.org/blog/2008/05/15/jared-tarbells-happy-place-in-as3/</link>
		<comments>http://dirty-motherfucker.org/blog/2008/05/15/jared-tarbells-happy-place-in-as3/#comments</comments>
		<pubDate>Thu, 15 May 2008 12:54:04 +0000</pubDate>
		<dc:creator>gencha</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[processing]]></category>
		<category><![CDATA[jared tarbell]]></category>

		<guid isPermaLink="false">http://dirty-motherfucker.org/blog/?p=56</guid>
		<description><![CDATA[2008-05-26: I fixed some parts of this port. For further details check the updated works post. I finished another one of Jared Tarbell&#8217;s works. Based on the experience with Substrate, this port was straight-forward. I also just gave the new Flash Player 10 Beta a run for it&#8217;s money. I can only recommend installing it [...]]]></description>
			<content:encoded><![CDATA[<p>2008-05-26: I fixed some parts of this port. For further details check <a href="http://dirty-motherfucker.org/blog/2008/05/26/updated-processing-works/">the updated works post</a>.</p>
<p>I finished another one of <a href="http://www.complexification.net/">Jared Tarbell&#8217;s works</a>. Based on the experience with Substrate, this port was straight-forward.</p>
<p>I also just gave the new <a href="http://labs.adobe.com/technologies/flashplayer10/">Flash Player 10 Beta</a> a run for it&#8217;s money. I can only recommend installing it for a test runs on these <a href="http://processing.org">Processing</a> ports. On my Core2 Duo E6600 with FP9 one core is usually maxed out drawing these demos with reasonable speed. With FP10 i get fluid performance with CPU time to spare.</p>
<p>So here it is (click to start):<br />

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_happyplaceas3_5121_1250181880"
			class="flashmovie"
			width="512"
			height="512">
	<param name="movie" value="http://dirty-motherfucker.org/blog/wp-content/uploads/2008/05/happyplaceas3_5121.swf" />
	<param name="play" value="false" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://dirty-motherfucker.org/blog/wp-content/uploads/2008/05/happyplaceas3_5121.swf"
			name="fm_happyplaceas3_5121_1250181880"
			width="512"
			height="512">
		<param name="play" value="false" />
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p>There is also a <a href="http://dirty-motherfucker.org/blog/wp-content/uploads/2008/05/happyplaceas3_900.swf">larger version</a> (900&#215;900).</p>
<p>As before you can also grab the <a href="http://dirty-motherfucker.org/blog/wp-content/uploads/2008/05/happyplaceas3_source.zip">source code</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://dirty-motherfucker.org/blog/2008/05/15/jared-tarbells-happy-place-in-as3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

