<?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>noCreativity.com &#187; AS3</title>
	<atom:link href="http://nocreativity.com/blog/tag/as3/feed" rel="self" type="application/rss+xml" />
	<link>http://nocreativity.com</link>
	<description>The life and discoveries of a new media artist</description>
	<lastBuildDate>Sat, 07 Jan 2012 17:03:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Getting started with Red5</title>
		<link>http://nocreativity.com/blog/getting-started-with-red5</link>
		<comments>http://nocreativity.com/blog/getting-started-with-red5#comments</comments>
		<pubDate>Mon, 01 Aug 2011 12:17:17 +0000</pubDate>
		<dc:creator>Ronny</dc:creator>
				<category><![CDATA[Red5]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[netstatusinfo]]></category>

		<guid isPermaLink="false">http://nocreativity.com/blog/?p=1345</guid>
		<description><![CDATA[If you ever wanted to get started with Red5 and actually start creating apps for/with it, you know how hard it is to finally make it work for the first time. I decided to create a few tutorials that help you get started by sharing everything I learned using The Internet, messing around and having [...]]]></description>
			<content:encoded><![CDATA[<p>If you ever wanted to get started with Red5 and actually start creating apps for/with it, you know how hard it is to finally make it work for the first time. I decided to create a few tutorials that help you get started by sharing everything I learned using <em>The Internet</em>, messing around and having great lecturers at school. <img src='http://nocreativity.com/blog-engine/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  Here&#8217;s the first step: Setting up Red5 and Eclipse so you can do what matters which is &#8216;<em>creating stuff</em>&#8216;.</p>

<!-- powered by Iframe plugin ver. 1.7 (wordpress.org/extend/plugins/iframe/) -->
<iframe class="iframe-class" width="580" height="363" src="http://player.vimeo.com/video/27059211?byline=0&amp;portrait=0&amp;color=d6d6d6" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" allowtransparency="true"></iframe>
<h3>Links mentioned in the tutorial</h3>
<ul>
<li><a href="http://www.red5.org/" target="_blank" target="_blank">Red5</a></li>
<li><a href="http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/indigor" target="_blank" target="_blank">Eclipse for Java EE Developers</a></li>
<li><a href="http://nocreativity.com/blog/fixing-the-netstatusevent-info-code-ugliness-in-actionscript-3" target="_blank">NetStatusInfo class</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://nocreativity.com/blog/getting-started-with-red5/feed</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Particle power!</title>
		<link>http://nocreativity.com/blog/particle-power</link>
		<comments>http://nocreativity.com/blog/particle-power#comments</comments>
		<pubDate>Mon, 05 Apr 2010 11:44:36 +0000</pubDate>
		<dc:creator>Ronny</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Experiments]]></category>
		<category><![CDATA[Open-source]]></category>
		<category><![CDATA[Actionscript3]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[FITC]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[letitbloom]]></category>
		<category><![CDATA[particles]]></category>
		<category><![CDATA[ralph hauwert]]></category>

		<guid isPermaLink="false">http://nocreativity.com/blog/?p=948</guid>
		<description><![CDATA[Ever since Ralph Hauwert first announced his part of the LetItBloom site, I kinda wondered how he did it. V1 A few weeks ago, in Amsterdam, Ralph explained a bit about it during his session. And then finally yesterday (actually the day before&#8230;), I bit the bullet and spent the evening making it happen. Only [...]]]></description>
			<content:encoded><![CDATA[<p>Ever since <a href="http://unitzeroone.com" target="_blank" target="_blank">Ralph Hauwert</a> first announced <a href="http://www.letitbloom.com/#ralph" target="_blank" target="_blank">his part</a> of the <a href="http://letitbloom.com" target="_blank" target="_blank">LetItBloom</a> site, I kinda wondered how he did it.</p>
<p><a href="http://www.letitbloom.com/#ralph" target="_blank" target="_blank"><img class="alignnone size-full wp-image-949" title="Ralph Hauwert's LetItBloom part (preview)" src="http://nocreativity.com/blog-engine/wp-content/uploads/2010/04/bloom.jpg" alt="" width="580" height="361" /></a></p>
<h3><strong>V1</strong></h3>
<p>A few weeks ago, in Amsterdam, Ralph explained a bit about it during his session. And then finally yesterday (actually the day before&#8230;), I bit the bullet and spent the evening making it happen. Only 4 hours later I had a first version that got pretty close to it.</p>
<p><a href="http://labs.nocreativity.com/particles/one/?inspired%20by%20Ralph%20Hauwert" target="_blank"><img class="alignnone size-full wp-image-950" title="Particle testing - Part one (no blur preview)" src="http://nocreativity.com/blog-engine/wp-content/uploads/2010/04/particleFun_V1.jpg" alt="" width="580" height="266" /></a></p>
<p>Check this very first edition on the following URLs. The text is generated using AS3, so you can just make it show any text you want. Just change the URL params <img src='http://nocreativity.com/blog-engine/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<ul>
<li><a href="http://labs.nocreativity.com/particles/one/?inspired%20by%20Ralph%20Hauwert" target="_blank">Particle fun V1 (with blur)</a></li>
<li><a href="http://labs.nocreativity.com/particles/one/noblur/?inspired%20by%20Ralph%20Hauwert" target="_blank">Particle fun V1 (without blur)</a></li>
</ul>
<p>The particles move to a perlin-map (red &amp; green) with text in front of it. The color of each pixel is used to determine whether the particles has to move up,down,left or right and how far. Not how fast&#8230; That left all particles moving almost equally fast&#8230; Which is kind of a minor downside to me&#8230; Seeing how it almost was 6AM, I felt it were a good idea to catch some sleep&#8230;<span id="more-948"></span></p>
<h3><strong>V2</strong></h3>
<p>When I woke up a few hours later, I felt the irresistible need to improve the effect of the particle swarms and optimize some code in order to squeeze a few more frames per second out of the code.</p>
<p><a href="http://labs.nocreativity.com/particles/two/?OMGWTFBBQ%20particles%20rock!" target="_blank"><img class="alignnone size-full wp-image-951" title="Particle Fun V2" src="http://nocreativity.com/blog-engine/wp-content/uploads/2010/04/particleFun_v2.jpg" alt="" width="580" height="269" /></a></p>
<p>I ruined the rest of my day coming up with another version. This time the perlin-map&#8217;s color would not just serve as a guide who tells the particles where to go and how far. The map would actually act as a force field: Each pixel would accelerate the particles on both the x and y-axis. As a result: we have now very different speeds of particles! And it looks pretty cool too! Example below. The text can be controlled using the URL parameters.</p>
<ul>
<li><a href="http://labs.nocreativity.com/particles/two/?OMGWTFBBQ%20particles%20rock!" target="_blank">Particle fun V2 </a></li>
</ul>
<p><strong>Watch out! Nerd time!</strong></p>
<p>This final version (well&#8230; final&#8230;) looks pretty good in my opinion. A few details about it:</p>
<ul>
<li>25000 particles (1 particle = 1 pixel)</li>
<li>runs up to 85fps (Capped this at 50fps, otherwise it the animation would be too wild)</li>
<li>The bitmapdata object&#8217;s dimensions: 750 x 350</li>
</ul>
<p><strong>Most important things</strong></p>
<p>During this experiment I learned a lot about optimization. A few things that might come in handy some time:</p>
<ul>
<li>Instead of using setPixel() for every single pixel you wish to animate, only update the bitmapdata once using setVector(). You can get the vector of pixelvalues from the bitmapdata obj using getVector(). Then change the values in the vector. When done, appy the new values to the bitmapdata object using setVector(). This will give you some valuable milliseconds (believe me: every millisecond counts when doing 25 000 loops per frame)</li>
<li>Instead of looping through long arrays  (or even vectors) use <a href="http://blog.open-design.be/2009/01/04/as3-arrays-against-linked-lists-performance-benchmarking/" target="_blank" target="_blank">linked lists</a>: They&#8217;re easy and fast!</li>
<li>Bitwise operations might look very unhuman, but they can buy you a great deal of milliseconds! Make sure you check the bitwise possibilities that there are out there. A lot of great minds have shared &#8216;common&#8217; calculations in the form of bitwise operations that turn out to be just a bit faster.</li>
<li>Think a <strong>lot</strong> about what kind of calculations you&#8217;re going to make and most importantly: When? For example in my first version: I get the pixelvalue from the perlinmap every iteration of the loop (times 25 000). However in version 2, after generating the perlin map, I immediately calculated the forces of every pixel and saved the values in a vector. I then request those values in the loops. This kind of precalculations will give you valuable milliseconds per frame and thus more fps.</li>
<li>When editing pixel per pixel, make sure to lock()/unlock() your bitmapdata. That will prevent the bitmap from updating after every change. Again: giving you more milliseconds for your viewing pleasure!</li>
</ul>
<p>I can&#8217;t really post any technical optimization tips (since I really just got started myself) but there are tons of articles out there on this topic. I suggest you check those out for more practical optimization tips.</p>
<p>I&#8217;m looking into doing more experimentation regarding particles. If you have any optimization techniques that I should know off, don&#8217;t hold back to educate me <img src='http://nocreativity.com/blog-engine/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Either way: I really love this, so stay tuned!</p>
<p><strong>Sources</strong>: <a href="http://nocreativity.com/blog-engine/wp-content/plugins/download-monitor/download.php?id=7" title="ParticleLab - Downloaded 320 times">Click</a> (Flash Builder 4 project)</p>
]]></content:encoded>
			<wfw:commentRss>http://nocreativity.com/blog/particle-power/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Actionscript is cool for developers. Not for me.</title>
		<link>http://nocreativity.com/blog/actionscript-is-cool-for-developers-not-for-me</link>
		<comments>http://nocreativity.com/blog/actionscript-is-cool-for-developers-not-for-me#comments</comments>
		<pubDate>Fri, 05 Feb 2010 13:25:10 +0000</pubDate>
		<dc:creator>Ronny</dc:creator>
				<category><![CDATA[Everything else]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[experimental experience]]></category>
		<category><![CDATA[for fucks sake!]]></category>
		<category><![CDATA[frustration]]></category>
		<category><![CDATA[fun coding]]></category>

		<guid isPermaLink="false">http://nocreativity.com/blog/?p=881</guid>
		<description><![CDATA[I love the creative process, I love experimenting, I love discovering new things and doing all kinds of stuff with it. I like to create toys that tell me something about myself. Having said that: I am a passionate Interactive Experience Designer. It&#8217;s a title I like because it tells you everything about me in [...]]]></description>
			<content:encoded><![CDATA[<p>I love the creative process, I love experimenting, I love discovering new things and doing all kinds of stuff with it. I like to create <em>toys</em> that tell me something about myself. Having said that: I am a passionate <em>Interactive Experience Designer</em>. It&#8217;s a title I like because it tells you everything about me in 3 words.</p>
<ul>
<li>Interactive: I want the user to be able to control what is happening. The user should always be part of the application. The user should actively be engaging with the application. Whatever happens should happen either because of the user or for the user to get an even better experience.</li>
<li>Experience: I don&#8217;t want them to just click a few buttons. I want my users to like the application. I want them to like it so much, that they start missing it once they&#8217;ve closed the browser window.</li>
<li>Designer: Although most of you know me as a developer, I want to make a point here: I don&#8217;t develop. I create.<br />
I write code in order to create a visual masterpiece, either in interaction or experience; not in code; not in application architecture; none of those non-Ronny words.</li>
</ul>
<p>That last point is really the reason of why I&#8217;m writing this. Having said the above, it should be clear Actionscript has enabled me to create cool stuff. Actionscript has enabled me to create whatever I could think off. But now at this point, I&#8217;m eager to go beyond my current limits, and I want to go there fast!<span id="more-881"></span></p>
<p>Only a few minutes ago, I was thinking about how I&#8217;d start creating this new (experimental) application. And before I even got to actually start building the whole thing, I lost motivation. It is <strong>SO MUCH WORK</strong> to only setup the application without  the actual features I wanted to build in the first place. How am I supposed to have fun?!</p>
<p>I came to realize how much I miss the AS2 coding style where you just created. You would just have pointed at a movieclip, and run a <em>loadMovie()</em>. It doesn&#8217;t get any quicker than that.<br />
Even worse: I missed the loosely typed, old fashioned JavaScript style of getting straight down to business. My guess is: You don&#8217;t understand what I&#8217;m trying to say here. Let&#8217;s show you a simple example: <em>Load an image and add it to a sprite on the stage</em>.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">IOErrorEvent</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Loader</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.display</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">Bitmap</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.net</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">URLRequest</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">url</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">URLRequest</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">URLRequest</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;myPicture.jpg&quot;</span><span style="color: #000000;">&#41;</span>
<span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">loader</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Loader</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Loader</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
addListeners<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #004993;">loader</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">load</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">url</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> addListeners<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
	<span style="color: #004993;">loader</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">contentLoaderInfo</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">COMPLETE</span><span style="color: #000066; font-weight: bold;">,</span> completeEvent<span style="color: #000000;">&#41;</span>
	<span style="color: #004993;">loader</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">contentLoaderInfo</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">IOErrorEvent</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">IO_ERROR</span><span style="color: #000066; font-weight: bold;">,</span> ioErrorHandler<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span>
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> removeListeners<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
	<span style="color: #004993;">loader</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">contentLoaderInfo</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">removeEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">COMPLETE</span><span style="color: #000066; font-weight: bold;">,</span> completeEvent<span style="color: #000000;">&#41;</span>
	<span style="color: #004993;">loader</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">contentLoaderInfo</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">removeEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">IOErrorEvent</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">IO_ERROR</span><span style="color: #000066; font-weight: bold;">,</span> ioErrorHandler<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span>
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> completeEvent<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
	removeListeners<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> bm<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Bitmap</span> = <span style="color: #004993;">Bitmap</span><span style="color: #000000;">&#40;</span>e<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">target</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">content</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	someSprite<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>bm<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span>
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> ioErrorHandler<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">IOErrorEvent</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
	removeListeners<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;Ay, yo' pic is gone, mate!&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>This looks pretty straight forward, right? Create a loader, add the eventlisteners for completion and error, handle them, and remove the listeners. This is as straight forward as it gets.<br />
Well even though this is as basic as it get&#8217;s: It&#8217;s too much! This should be easier! Shorter! Hell: it should be more fun!</p>
<p>If loading this image is your application, then this is not that much of a problem. If loading 3 images is only a small (and almost not important) part of your test-application, then all of this code is way too much effort to focus on what you actually wanted to do: Test something completely different!</p>
<p>You might think I&#8217;m exaggerating here, but I&#8217;m not. When I think of a cool little experiment, I don&#8217;t want to spend all day starting to create it, only to end with 10 minutes of <em>writing the actual test code</em>. I don&#8217;t want to write 300 lines of code in order to just test something that consists of 10 lines.</p>
<p>I&#8217;m not asking Adobe to make AS4 shorter-handed, I&#8217;m not calling anybody out to create a framework that enables me to have fun, I&#8217;m not asking anybody something. I&#8217;m just getting tired of having to write bullshit JAVA-assed best practice code in tiny-experimental-proof-of-concept-test-applications.</p>
<p>I don&#8217;t feel like I&#8217;m using ActionScript anymore&#8230; I feel like I&#8217;m subjecting myself to it. I&#8217;m not in control. Actionscript is. If I don&#8217;t agree with that close minded language, it&#8217;s not going to cooperate in any way&#8230; I have to talk to it very genly, and choose my words wisely&#8230; What the f###? It&#8217;s a computer! Now bend over and do as your told!</p>
<p>When writing test-applications (which is basically what I do 90% of the time), I want to get the job done. I don&#8217;t want the code to look good. In fact, when creating this test builds that are a kick in the teeth for every best practice rule in the universe, I couldn&#8217;t be bothered in a lifetime about coding conventions&#8230; I just want my freaking app to start working!</p>
]]></content:encoded>
			<wfw:commentRss>http://nocreativity.com/blog/actionscript-is-cool-for-developers-not-for-me/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Open Microphone pt 1</title>
		<link>http://nocreativity.com/blog/open-microphone-pt-1</link>
		<comments>http://nocreativity.com/blog/open-microphone-pt-1#comments</comments>
		<pubDate>Fri, 25 Sep 2009 14:10:04 +0000</pubDate>
		<dc:creator>Ronny</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[getMicrophone]]></category>
		<category><![CDATA[mic]]></category>
		<category><![CDATA[microphone]]></category>
		<category><![CDATA[mikerophone]]></category>
		<category><![CDATA[SoundAnalyzing]]></category>
		<category><![CDATA[SoundSpectrum]]></category>

		<guid isPermaLink="false">http://nocreativity.com/blog/?p=669</guid>
		<description><![CDATA[If you&#8217;ve come by here a few times you know I have been experimenting with computeSpectrum and webcam motion detection. At a given moment I wanted to combine the 2 of them in order to use voice commands in order to make stuff happen on the screen. That would be pretty badass, right? However I [...]]]></description>
			<content:encoded><![CDATA[<p><img class="size-full wp-image-670 alignleft" title="mikerophone" src="http://nocreativity.com/blog-engine/wp-content/uploads/2009/09/mikerophone.jpg" alt="mikerophone" width="220" height="239" />If you&#8217;ve come by here a few times you know I have been experimenting with computeSpectrum and webcam motion detection. At a given moment I wanted to combine the 2 of them in order to use voice commands in order to make stuff happen on the screen. That would be pretty badass, right?</p>
<p>However I soon learned the microphone feed didn&#8217;t go through the SoundMixer of the Flash Player, therefor would would not be able to be analyzed. There was a workaround with FMS/RED5 and bouncing the stream off the server but that&#8217;s rather overkill (not to mention the lag). <span id="more-669"></span></p>
<p><strong>However&#8230;<br />
</strong>Mike Chambers and Lee Brimelow were in Paris the other day where they demoed/demo&#8217;ed/demo-ed (how the hell do you spell that word??) a few new features of the upcoming AIR release. If you don&#8217;t already know, you&#8217;ll probably have guessed it by now but (just to be crystal clear): The microphone is accesible for computeSpectrum in the AIR runtime. Check out <a href="http://theflashblog.com/?p=1426" target="_blank" target="_blank">the demo</a> on Lee&#8217;s blog <img src='http://nocreativity.com/blog-engine/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Lee stated on his blog he couldn&#8217;t talk about this feature being brought to the Flash Player, but I&#8217;m pretty confident Adobe will do so <img src='http://nocreativity.com/blog-engine/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
Even though I&#8217;m not much of an AIR developer, I like the idea of having access to both microphone and camera&#8230; I can image a few cool applications using those features&#8230; <img src='http://nocreativity.com/blog-engine/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /> </p>
<p>By the way: If you don&#8217;t already know: there&#8217;s a great site with all kinds of intresting articles on the subject. If you&#8217;re interested, make sure to check it out: <a href="http://www.getmicrophone.com/" target="_blank" target="_blank">getMicrophone()</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://nocreativity.com/blog/open-microphone-pt-1/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bezier animation fun revisited</title>
		<link>http://nocreativity.com/blog/bezier-animation-fun-revisited</link>
		<comments>http://nocreativity.com/blog/bezier-animation-fun-revisited#comments</comments>
		<pubDate>Mon, 07 Sep 2009 22:17:36 +0000</pubDate>
		<dc:creator>Ronny</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Download]]></category>
		<category><![CDATA[Open-source]]></category>
		<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Bezier]]></category>
		<category><![CDATA[BezierAnimation]]></category>
		<category><![CDATA[Experiments]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[source]]></category>

		<guid isPermaLink="false">http://nocreativity.com/blog/?p=600</guid>
		<description><![CDATA[A few months ago I experimented with Bezier Animation and allthough I uploaded my SWF files and shared them, I never really shared the source. This is what I wanted to do a few days ago when I thought &#8220;Oh, what the hell&#8230; Let&#8217;s clean that code up before uploading it&#8230;&#8221;. So I started moving [...]]]></description>
			<content:encoded><![CDATA[<p>A few months ago <a href="http://nocreativity.com/blog/bezier-animation-fun" target="_blank">I experimented</a> with Bezier Animation and allthough I uploaded my SWF files and shared them, I never <span style="text-decoration: line-through;">really</span> shared the source. This is what I wanted to do a few days ago when I thought &#8220;Oh, what the hell&#8230; Let&#8217;s clean that code up before uploading it&#8230;&#8221;.</p>
<p>So I started moving some code around and after a few minutes, I found myself rewriting the whole thing&#8230; That&#8217;s not a bad thing since now we&#8217;ve got one handy class that can do about just everything a Bezier Animator should be able to do. <img src='http://nocreativity.com/blog-engine/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
<a href="http://labs.nocreativity.com/bezier/BezierAnimationDemo.html"rel="shadowbox;width=900;height=450" >Demo time</a>!</p>
<p style="text-align: center;"><a href="http://labs.nocreativity.com/bezier/BezierAnimationDemo.html"rel="shadowbox;width=900;height=450" ><img class="size-full wp-image-601 aligncenter" title="Bezier Animation Demo" src="http://nocreativity.com/blog-engine/wp-content/uploads/2009/09/screenshot-2009-09-07-at-23.38.10.JPG" alt="Bezier Animation Demo" width="559" height="262" /></a></p>
<p style="text-align: left;">There&#8217;s still a little bug somewhere which allows the target to &#8216;run away&#8217; from the bezier, and I haven&#8217;t gotten quite to the root of the problem, but I really felt I had to share this. Also there are some imperfections when you disable the orientToPath and scaleByPath properties. I will look into fixing those asap.</p>
<p style="text-align: left;">I really love the idea of animation movieclips using bezier curves. It looks so natural and yet zo intriguing&#8230; I will do some experiments and upload them later on, showing the coolness behind this simple animation engine.</p>
<p><strong>Sources<br />
</strong>Download the above demo source (Flash Builder 4 project): <a href="http://nocreativity.com/blog-engine/wp-content/plugins/download-monitor/download.php?id=2" title="BezierAnimation Demo Sources - Downloaded 387 times">Click</a><br />
Download the BezierAnimatioin class: <a href="http://nocreativity.com/blog-engine/wp-content/plugins/download-monitor/download.php?id=3" title="BezierAnimation class - Downloaded 419 times">Click</a></p>
<p><strong><br />
</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://nocreativity.com/blog/bezier-animation-fun-revisited/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Some more bitmapdata and soundSpectrum progress</title>
		<link>http://nocreativity.com/blog/some-more-bitmapdata-and-soundspectrum-progress</link>
		<comments>http://nocreativity.com/blog/some-more-bitmapdata-and-soundspectrum-progress#comments</comments>
		<pubDate>Sun, 30 Nov 2008 13:17:15 +0000</pubDate>
		<dc:creator>Ronny</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Audio]]></category>
		<category><![CDATA[bitmap]]></category>
		<category><![CDATA[Bitmapdata]]></category>
		<category><![CDATA[computeSpectrum]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Generative]]></category>
		<category><![CDATA[MP3]]></category>
		<category><![CDATA[player]]></category>
		<category><![CDATA[Playr]]></category>
		<category><![CDATA[SoundMixer]]></category>
		<category><![CDATA[SoundSpectrum]]></category>
		<category><![CDATA[Visualization]]></category>
		<category><![CDATA[Visualizr]]></category>

		<guid isPermaLink="false">http://nocreativity.com/blog/?p=255</guid>
		<description><![CDATA[Today I found some time to mess around with bitmapdata and computeSpectrum again. I&#8217;ve been playing with this earlier, but didn&#8217;t quite get where I wanted to be. A few weeks ago I came up with a better way of rendering the soundTunnel. That resulted in some crazy cool shit, which I finished off today. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://nocreativity.com/blog-engine/wp-content/uploads/2008/11/picture-30.jpg"><img class="aligncenter size-full wp-image-267" title="picture-30" src="http://nocreativity.com/blog-engine/wp-content/uploads/2008/11/picture-30.jpg" alt="" width="500" height="297" /></a></p>
<p>Today I found some time to mess around with bitmapdata and computeSpectrum again. I&#8217;ve been playing with this earlier, but didn&#8217;t quite get where I wanted to be. A few weeks ago I came up with a better way of rendering the soundTunnel. That resulted in some crazy cool shit, which I finished off today.</p>
<p>I won&#8217;t go into technical details here (yet). I just wanted you guys to see the result.</p>
<p><strong>Demo</strong></p>
<p>Click <a href="http://labs.nocreativity.com/soundCoolness/Visualizr.html" target="_blank">here</a> <img src='http://nocreativity.com/blog-engine/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
And just to make sure it is actually reacting to the sound, try the following links too</p>
<ul>
<li>Song 1: <a href="http://labs.nocreativity.com/soundCoolness/Visualizr.html?s=1" target="_blank">Click</a></li>
<li>Song 2: <a href="http://labs.nocreativity.com/soundCoolness/Visualizr.html?s=2" target="_blank">Click</a></li>
<li>Song 3: <a href="http://labs.nocreativity.com/soundCoolness/Visualizr.html?s=3" target="_blank">Click</a> (default)<a href="http://labs.nocreativity.com/soundCoolness/Visualizr.html?s=1" target="_blank"><br />
</a></li>
<li>Song 4: <a href="http://labs.nocreativity.com/soundCoolness/Visualizr.html?s=4" target="_blank">Click</a></li>
<li>Song 5: <a href="http://labs.nocreativity.com/soundCoolness/Visualizr.html?s=5" target="_blank">Click</a></li>
</ul>
<p><strong>Controls</strong></p>
<ul>
<li>F: Go full screen</li>
<li>S: Freeze visualization</li>
<li>Click: Change color (happens automatically too)</li>
</ul>
<p><span id="more-255"></span></p>
<p><strong>Screenshots</strong></p>
<p><a href="http://nocreativity.com/blog-engine/wp-content/uploads/2008/11/picture-19.jpg"><img class="aligncenter size-full wp-image-256" title="picture-19" src="http://nocreativity.com/blog-engine/wp-content/uploads/2008/11/picture-19.jpg" alt="" width="500" height="294" /></a></p>
<p><a href="http://nocreativity.com/blog-engine/wp-content/uploads/2008/11/picture-20.jpg"><img class="aligncenter size-full wp-image-257" title="picture-20" src="http://nocreativity.com/blog-engine/wp-content/uploads/2008/11/picture-20.jpg" alt="" width="499" height="298" /></a></p>
<p><a href="http://nocreativity.com/blog-engine/wp-content/uploads/2008/11/picture-211.jpg"><img class="aligncenter size-full wp-image-258" title="picture-211" src="http://nocreativity.com/blog-engine/wp-content/uploads/2008/11/picture-211.jpg" alt="" width="500" height="299" /></a></p>
<p><a href="http://nocreativity.com/blog-engine/wp-content/uploads/2008/11/picture-22.jpg"><img class="aligncenter size-full wp-image-259" title="picture-22" src="http://nocreativity.com/blog-engine/wp-content/uploads/2008/11/picture-22.jpg" alt="" width="499" height="297" /></a></p>
<p><a href="http://nocreativity.com/blog-engine/wp-content/uploads/2008/11/picture-23.jpg"><img class="aligncenter size-full wp-image-260" title="picture-23" src="http://nocreativity.com/blog-engine/wp-content/uploads/2008/11/picture-23.jpg" alt="" width="500" height="293" /></a></p>
<p><a href="http://nocreativity.com/blog-engine/wp-content/uploads/2008/11/picture-24.jpg"><img class="aligncenter size-full wp-image-261" title="picture-24" src="http://nocreativity.com/blog-engine/wp-content/uploads/2008/11/picture-24.jpg" alt="" width="500" height="294" /></a></p>
<p><a href="http://nocreativity.com/blog-engine/wp-content/uploads/2008/11/picture-25.jpg"><img class="aligncenter size-full wp-image-262" title="picture-25" src="http://nocreativity.com/blog-engine/wp-content/uploads/2008/11/picture-25.jpg" alt="" width="500" height="295" /></a></p>
<p><a href="http://nocreativity.com/blog-engine/wp-content/uploads/2008/11/picture-26.jpg"><img class="aligncenter size-full wp-image-263" title="picture-26" src="http://nocreativity.com/blog-engine/wp-content/uploads/2008/11/picture-26.jpg" alt="" width="500" height="297" /></a></p>
<p><a href="http://nocreativity.com/blog-engine/wp-content/uploads/2008/11/picture-27.jpg"><img class="aligncenter size-full wp-image-264" title="picture-27" src="http://nocreativity.com/blog-engine/wp-content/uploads/2008/11/picture-27.jpg" alt="" width="500" height="296" /></a></p>
<p><a href="http://nocreativity.com/blog-engine/wp-content/uploads/2008/11/picture-28.jpg"><img class="aligncenter size-full wp-image-265" title="picture-28" src="http://nocreativity.com/blog-engine/wp-content/uploads/2008/11/picture-28.jpg" alt="" width="500" height="297" /></a></p>
<p><a href="http://nocreativity.com/blog-engine/wp-content/uploads/2008/11/picture-29.jpg"><img class="aligncenter size-full wp-image-266" title="picture-29" src="http://nocreativity.com/blog-engine/wp-content/uploads/2008/11/picture-29.jpg" alt="" width="500" height="299" /></a></p>
<p><a href="http://nocreativity.com/blog-engine/wp-content/uploads/2008/11/picture-31.jpg"><img class="aligncenter size-full wp-image-268" title="picture-31" src="http://nocreativity.com/blog-engine/wp-content/uploads/2008/11/picture-31.jpg" alt="" width="499" height="297" /></a></p>
<p><a href="http://nocreativity.com/blog-engine/wp-content/uploads/2008/11/picture-32.jpg"><img class="aligncenter size-full wp-image-269" title="picture-32" src="http://nocreativity.com/blog-engine/wp-content/uploads/2008/11/picture-32.jpg" alt="" width="500" height="298" /></a></p>
<p><a href="http://nocreativity.com/blog-engine/wp-content/uploads/2008/11/picture-33.jpg"><img class="aligncenter size-full wp-image-270" title="picture-33" src="http://nocreativity.com/blog-engine/wp-content/uploads/2008/11/picture-33.jpg" alt="" width="500" height="297" /></a></p>
<p><a href="http://nocreativity.com/blog-engine/wp-content/uploads/2008/11/picture-34.jpg"><img class="aligncenter size-full wp-image-271" title="picture-34" src="http://nocreativity.com/blog-engine/wp-content/uploads/2008/11/picture-34.jpg" alt="" width="500" height="297" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://nocreativity.com/blog/some-more-bitmapdata-and-soundspectrum-progress/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>De boze boze garbage collector in ActionScript 3</title>
		<link>http://nocreativity.com/blog/de-boze-boze-garbage-collector-in-actionscript-3</link>
		<comments>http://nocreativity.com/blog/de-boze-boze-garbage-collector-in-actionscript-3#comments</comments>
		<pubDate>Wed, 18 Jun 2008 16:04:21 +0000</pubDate>
		<dc:creator>Ronny</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Garbage collector]]></category>
		<category><![CDATA[Scope]]></category>
		<category><![CDATA[Tweens]]></category>

		<guid isPermaLink="false">http://nocreativity.com/blog/?p=115</guid>
		<description><![CDATA[Sinds ik vorig jaar in september begonnen ben met ActionScript 3 te leren, en te gebruiken, ben ik al veel op het probleem gestoten waar ik niet-werkende, of maar half-werkende (ActionScript) tweens kreeg. Ik dacht altijd dat het aan mijn slechte coding skills lag, maar op termijn begon ik toch wat meer zelfvertrouwen krijgen, en [...]]]></description>
			<content:encoded><![CDATA[<p>Sinds ik vorig jaar in september begonnen ben met ActionScript 3 te leren, en te gebruiken, ben ik al veel op het probleem gestoten waar ik niet-werkende, of maar half-werkende (ActionScript) tweens kreeg. Ik dacht altijd dat het aan mijn slechte coding skills lag, maar op termijn begon ik toch wat meer zelfvertrouwen krijgen, en besefte ik dat het probleem niet zozeer bij mij lag.</p>
<p>Tijdens het ontwikkelen van de site voor mijn eindwerk in december liep de emmer over: Alweer een project waarin het ActionScript tweenen niet wilde lukken. <a href="http://blog.desaturated.be/" target="_self" target="_blank">Gerrit</a> kwam me helpen, en na even zoeken kon hij me vertellen dat de fout inderdaad niet bij mij lag, maar bij de <a href="http://en.wikipedia.org/wiki/Garbage_collection_(computer_science)" target="_blank" target="_blank">garbage collector</a> in de Flash Player.<br />
Mijn probleem was vanaf dan opgelost, en in elk project waar ik nu ActionScript-matige tweens aanmaak kan ik dat probleem meteen uit de weg gaan, maar ik zie nog enorm veel vragen opduiken waarin dit exact zelfde probleem besproken wordt.<span id="more-115"></span></p>
<p><strong>Hoe ontstaat dit probleem?<br />
</strong>Het probleem zelf ontstaat (voor zover ik het heb gezien) als je in een functie/handler een lokale tween aanmaakt, zonder externe referenties te behouden.</p>
<p style="padding-left: 30px;">Voorbeeld:</p>
<pre class="brush: actionscript">function someHandler(e:Event):void{
var tween:Tween = new Tween(someMC,&#039;scaleX&#039;,Regular.easeOut,0,1,5,true);
}</pre>
</p>
<p>In bovenstaand voorbeeld wordt de functie someHandler opgeroepen eens er een event gedispatched wordt. Op dat moment wordt een tween aangemaakt in de scope van die functie. Eens deze functie doorlopen is, wordt deze verlaten, en zomee is deze scope niet meer in gebruik. Er is op dat moment geen referentie meer naar je tween object, dat je zonet hebt aangemaakt.</p>
<p>De garbage collector verwijdert variablen/objecten aan de hand van die referenties: Als er objecten zijn in scopes waar niets meer naar verwijst, is dat &#8216;garbage&#8217; en kan zomee verwijderd worden.<br />
Het tween object is hier ook onderhevig aan: Eens je de scope van die someHandler functie verlaat, is er geen referentie meer aanwezig naar je tween object, ookal is die visueel actief op de stage van je Flash movie. Als de garbage collector van de Flash Player dan voorbij komt om op te ruimen wordt je tween object verwijderd: op het scherm stopt je tween voordat hij klaar is.</p>
<p><strong>De oplossing?</strong><br />
Er zijn verschillende manieren om de garbage collector te vertellen dat we ons tween object nog nodig hebben.</p>
<ul>
<li>We declareren de tween globaal. Hiermee zal hij altijd in main scope aanwezig zijn, en zomee niet verwijderd worden tenzij wij dat zelf aangeven.</li>
<li>We kunnen diezelfde globale tween &#8216;hergebruiken&#8217; in diepere scopes. (Handig als je maar 1 tween hebt, waarvan je zeker weet dat hij zichzelf nooit zal overschrijven/vervangen.)</li>
<li>We maken een globale array aan, waar we elke tween aan toevoegen. Op die manier is er ten alle tijde een referentie naar ons tween object, en zal de garbage collector het niet kunnen verwijderen, tenzij we de tween uit de array verwijderen.</li>
</ul>
<p>De laatste oplossing heeft mij al veel gediend, en is weinig moeite.</p>
<p style="padding-left: 30px;">
<pre class="brush: actionscript">var garbage:Array = new Array();
function someHandler(e:Event):void{
var tween:Tween = new Tween(someMC,&#039;scaleX&#039;,Regular.easeOut,0,1,5,true);
garbage.push(tween);
}</pre>
</p>
<p><span style="text-decoration: line-through;">Dit is een nogal onprofessionele manier</span> Ik vind dit nogal een vuile manier om het probleem uit de wereld te helpen, maar het is wel de essentie van de oplossing.<br />
Bij extreem veel tweens in een applicatie die lang in gebruik is, is het misschien geen slecht idee om die array af en toe wat uit te kuisen: Tweens die niet meer gebruikt worden uit deze array verwijderen.</p>
<p>Er zijn mensen die me zeggen dat het gebruik van Tweener of TweenLite dit probleem ook meteen oplost. Ikzelf heb nog niet genoeg met Tweener gewerkt om daar zelf een oordeel over te kunnen vellen.</p>
<p>Ik hoop dat ik hier een aantal mensen kan mee helpen, gezien dit toch een populair probleem schijnt te blijven.</p>
]]></content:encoded>
			<wfw:commentRss>http://nocreativity.com/blog/de-boze-boze-garbage-collector-in-actionscript-3/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

