<?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>Empty Cache</title>
	<atom:link href="http://www.emptycache.nl/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.emptycache.nl</link>
	<description>media experiments</description>
	<lastBuildDate>Mon, 26 Oct 2009 10:29:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>TweenMax line writer</title>
		<link>http://www.emptycache.nl/2009/10/tweenmax-line-writer/</link>
		<comments>http://www.emptycache.nl/2009/10/tweenmax-line-writer/#comments</comments>
		<pubDate>Mon, 26 Oct 2009 09:50:14 +0000</pubDate>
		<dc:creator>jos</dc:creator>
				<category><![CDATA[Drawing]]></category>

		<guid isPermaLink="false">http://www.emptycache.nl/?p=42</guid>
		<description><![CDATA[I couldn&#8217;t do my job without tweening classes like the amazing TweenMax. But who sais you have to tween the properties of a display object? Why not tween the properties of &#8220;just an object&#8221; and then use the drawing api to connect all the dots? Just like those &#8220;draw me by following the numbers&#8221; drawings [...]]]></description>
			<content:encoded><![CDATA[<p>I couldn&#8217;t do my job without tweening classes like the amazing <a href="http://www.tweenmax.com" target="_blank">TweenMax</a>. But who sais you have to tween the properties of a display object? Why not tween the properties of &#8220;just an object&#8221; and then use the drawing api to connect all the dots? Just like those &#8220;draw me by following the numbers&#8221; drawings you loved as a kid <img src='http://www.emptycache.nl/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>In this case, I&#8217;m using the stunning bezierTrough feature of TweenMax to fluidly draw the line.</p>
<p><a href="http://www.emptycache.nl/files/LineWriterBezier.html" target="_blank"><img class="size-full wp-image-43 alignnone" title="Picture 1" src="http://www.emptycache.nl/wp-content/uploads/2009/10/Picture-11.png" alt="Picture 1" width="543" height="397" /></a></p>
<p><a href="http://www.emptycache.nl/files/LineWriterBezier.html" target="_blank">click for demo</a></p>
<p>Continue reading for source code (ofcourse you&#8217;ll be needing the <a href="http://www.tweenmax.com" target="_blank">TweenMax</a> classes):</p>
<p><code><span id="more-42"></span>package<br />
{<br />
import gs.TweenMax;<br />
import gs.easing.Sine;</code></p>
<p><code>import flash.display.Sprite;</code></p>
<p><code>/**<br />
* @author josfaber<br />
*/<br />
public class LineWriterBezier extends Sprite<br />
{</code></p>
<p><code>private var __points : Array = [<br />
{color:0xFFFFFF, points:[ {x:50, y:-50},{x:100, y:0},{x:250, y:650},{x:300, y:700},{x:350, y:650} ]},<br />
{color:0xFFDD00, points:[ {x:220, y:-120},{x:300, y:0},{x:350, y:50},{x:370, y:-90},{x:470, y:-80} ]},<br />
{color:0x00AA00, points:[ {x:600, y:-120},{x:900, y:200} ]},<br />
{color:0xAA00AA, points:[ {x:1100, y:400},{x:700, y:150} ]},<br />
{color:0x0099AA, points:[ {x:-150, y:150}, {x:0, y:0} ]},<br />
];<br />
private var __pos : Object = {x:0, y:0};<br />
private var __cur : int = 0;<br />
private var __canvas : Sprite;<br />
private var __maxspeed : int = 10;</code></p>
<p><code>public function LineWriterBezier()<br />
{<br />
// setup movable canvas (inverse camera)<br />
__canvas = new Sprite( );<br />
__canvas.x = .5 * stage.stageWidth;<br />
__canvas.y = .5 * stage.stageHeight;<br />
addChild( __canvas );</code></p>
<p><code>// draw markers<br />
drawMarkers();</code></p>
<p><code> </code></p>
<p><code>// setup initial position<br />
__canvas.graphics.moveTo( __pos.x, __pos.y );</code></p>
<p><code>// set it off<br />
nextTween( );<br />
}</code></p>
<p><code>private function drawMarkers():void<br />
{<br />
for (var i : int = 0; i &lt; __points.length; i++)<br />
{<br />
for (var j : int = 0; j &lt; __points[i].points.length; j++)<br />
{<br />
__canvas.graphics.lineStyle( 1, __points[i].color, 1, true );<br />
__canvas.graphics.drawCircle( __points[i].points[j].x, __points[i].points[j].y, 10 );<br />
}<br />
}<br />
}</code></p>
<p><code> </code></p>
<p><code>private function nextTween() : void<br />
{<br />
var numpoints:int = __points[__cur].points.length;<br />
TweenMax.to( __pos, 2 + .5 * numpoints, {onComplete:next, onUpdate:update, onUpdateParams:[__points[__cur].color], bezierThrough:__points[__cur].points, orientToBezier:false, ease:Sine.easeInOut} );<br />
}</p>
<p>private function update(color:uint = 0xFFFFFF) : void<br />
{<br />
// draw it<br />
__canvas.graphics.lineStyle( 5, color, 1 );<br />
__canvas.graphics.lineTo( __pos.x, __pos.y );</p>
<p>// move canvas delayed<br />
var targX : Number = .5 * stage.stageWidth - __pos.x;<br />
var targY : Number = .5 * stage.stageHeight - __pos.y;<br />
var addX : Number = Math.min( __maxspeed, Math.max( -__maxspeed, .25 * ( targX - __canvas.x ) ) );<br />
var addY : Number = Math.min( __maxspeed, Math.max( -__maxspeed, .25 * ( targY - __canvas.y ) ) );<br />
__canvas.x += addX;<br />
__canvas.y += addY;<br />
}</p>
<p>private function next():void<br />
{<br />
__cur = __cur &lt; __points.length - 1 ? __cur + 1 : 0;</p>
<p>if ( __cur == 0 )<br />
{<br />
__canvas.graphics.clear();<br />
drawMarkers();<br />
}</p>
<p></code></p>
<p><code> nextTween();<br />
}<br />
}<br />
}<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.emptycache.nl/2009/10/tweenmax-line-writer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Iso3D Audio VU meter</title>
		<link>http://www.emptycache.nl/2009/10/iso3d-audio-vu-meter/</link>
		<comments>http://www.emptycache.nl/2009/10/iso3d-audio-vu-meter/#comments</comments>
		<pubDate>Sat, 24 Oct 2009 09:44:13 +0000</pubDate>
		<dc:creator>jos</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Audio]]></category>

		<guid isPermaLink="false">http://www.emptycache.nl/?p=32</guid>
		<description><![CDATA[
click for demo
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.emptycache.nl/files/ISOVu" target="_blank"><img class="alignnone size-medium wp-image-35" title="Picture 1" src="http://www.emptycache.nl/wp-content/uploads/2009/10/Picture-1-300x167.png" alt="Picture 1" width="300" height="167" /></a></p>
<p>click for demo</p>
]]></content:encoded>
			<wfw:commentRss>http://www.emptycache.nl/2009/10/iso3d-audio-vu-meter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Actionscript 3 singleton pattern template for FDT 3 (Eclipse)</title>
		<link>http://www.emptycache.nl/2009/10/actionscript-3-singleton-pattern-template-for-fdt-3-eclipse/</link>
		<comments>http://www.emptycache.nl/2009/10/actionscript-3-singleton-pattern-template-for-fdt-3-eclipse/#comments</comments>
		<pubDate>Sat, 24 Oct 2009 09:33:13 +0000</pubDate>
		<dc:creator>jos</dc:creator>
				<category><![CDATA[IDE]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[fdt]]></category>
		<category><![CDATA[pattern]]></category>
		<category><![CDATA[singleton]]></category>

		<guid isPermaLink="false">http://www.emptycache.nl/?p=22</guid>
		<description><![CDATA[&#8220;What? The singleton pattern is gone in FDT3 actionscript 3?&#8221; No it&#8217;s not! You just have to alter a bit of code to get it to work. FDT didn&#8217;t include this template in their version 3. I got the pattern from &#8220;Actionscript 3 with Design Patterns&#8220;. Here&#8217;s the template code to have the CTRL-space-singleton action [...]]]></description>
			<content:encoded><![CDATA[<p>&#8220;What? The singleton pattern is gone in FDT3 actionscript 3?&#8221; No it&#8217;s not! You just have to alter a bit of code to get it to work. FDT didn&#8217;t include this template in their version 3. I got the pattern from &#8220;<a href="http://www.amazon.com/Advanced-ActionScript-3-Design-Patterns/dp/0321426568" target="_blank">Actionscript 3 with Design Patterns</a>&#8220;. Here&#8217;s the template code to have the CTRL-space-singleton action back again <img src='http://www.emptycache.nl/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Open FDT preferences, goto templates, then add a new one for AS3 and copy paste the code below (click continue reading)</p>
<p><code><span id="more-22"></span>package ${enclosing_package}<br />
{<br />
/**<br />
* @author ${user}<br />
*/<br />
public class ${enclosing_type}<br />
{<br />
private static var __instance:${enclosing_type};</code></p>
<p><code>public function ${enclosing_type}(enforcer:SingletonEnforcer) {}</code></p>
<p><code> </code></p>
<p><code>public static function getInstance():${enclosing_type}<br />
{<br />
if (${enclosing_type}.__instance == null)<br />
__instance	= new ${enclosing_type}( new SingletonEnforcer() );</p>
<p></code></p>
<p><code> return __instance;<br />
}<br />
}<br />
}<br />
class SingletonEnforcer {}</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.emptycache.nl/2009/10/actionscript-3-singleton-pattern-template-for-fdt-3-eclipse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Iso3D webcam nailbed</title>
		<link>http://www.emptycache.nl/2009/10/iso3d-webcam-nailbed/</link>
		<comments>http://www.emptycache.nl/2009/10/iso3d-webcam-nailbed/#comments</comments>
		<pubDate>Sat, 24 Oct 2009 09:30:32 +0000</pubDate>
		<dc:creator>jos</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[Camera]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[iso3d]]></category>
		<category><![CDATA[nailbed]]></category>
		<category><![CDATA[webcam]]></category>

		<guid isPermaLink="false">http://www.emptycache.nl/?p=9</guid>
		<description><![CDATA[Remember the old days, with that toy full of spikes? Where you could put your hand on, or face, and it would follow your shape? Man, I&#8217;ve put some funny things in there  
So, for all you perverts, and the rest for that matter, here&#8217;s the chance to do it all over again. But [...]]]></description>
			<content:encoded><![CDATA[<p>Remember the old days, with that toy full of spikes? Where you could put your hand on, or face, and it would follow your shape? Man, I&#8217;ve put some funny things in there <img src='http://www.emptycache.nl/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>So, for all you perverts, and the rest for that matter, here&#8217;s the chance to do it all over again. But then in a digital manner..</p>
<p><a href="http://www.emptycache.nl/files/ISOCamFun"><img class="alignnone size-full wp-image-15" title="4-2-2009-16-30-44" src="http://www.emptycache.nl/wp-content/uploads/2009/10/4-2-2009-16-30-44.png" alt="4-2-2009-16-30-44" width="450" height="252" /></a></p>
<p>check: <a href="http://www.emptycache.nl/files/ISOCamFun" target="_blank">www.emptycache.nl/files/ISOCamFun </a></p>
<p>Alrighty then, <a href="http://www.emptycache.nl/files/ISOCamFun/ISOGrid.zip">here&#8217;s</a> the source files.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.emptycache.nl/2009/10/iso3d-webcam-nailbed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Particle foam emitter</title>
		<link>http://www.emptycache.nl/2009/10/actionscript-3-particle-foam-emitter/</link>
		<comments>http://www.emptycache.nl/2009/10/actionscript-3-particle-foam-emitter/#comments</comments>
		<pubDate>Sat, 24 Oct 2009 09:15:01 +0000</pubDate>
		<dc:creator>jos</dc:creator>
				<category><![CDATA[Effects]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[particles]]></category>

		<guid isPermaLink="false">http://www.emptycache.nl/?p=5</guid>
		<description><![CDATA[Another dream of actionscript. Although this time a daydream  

Here&#8217;s the source
]]></description>
			<content:encoded><![CDATA[<p>Another dream of actionscript. Although this time a daydream <img src='http://www.emptycache.nl/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="500" height="300" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="name" value="lightning" /><param name="bgcolor" value="#000000" /><param name="align" value="middle" /><param name="src" value="http://www.emptycache.nl/wp-content/uploads/2009/10/particle_dust.swf" /><param name="allowfullscreen" value="false" /><param name="quality" value="high" /><embed type="application/x-shockwave-flash" width="500" height="300" src="http://www.emptycache.nl/wp-content/uploads/2009/10/particle_dust.swf" quality="high" allowfullscreen="false" align="middle" bgcolor="#000000" name="lightning"></embed></object></p>
<p><a href="http://www.emptycache.nl/wp-content/uploads/2009/10/particle_dustfla.zip">Here&#8217;s</a> the source</p>
]]></content:encoded>
			<wfw:commentRss>http://www.emptycache.nl/2009/10/actionscript-3-particle-foam-emitter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
