<?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; Flex</title>
	<atom:link href="http://nocreativity.com/blog/tag/flex/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>WebcamRelief</title>
		<link>http://nocreativity.com/blog/webcamrelief</link>
		<comments>http://nocreativity.com/blog/webcamrelief#comments</comments>
		<pubDate>Thu, 08 Oct 2009 15:02:54 +0000</pubDate>
		<dc:creator>Ronny</dc:creator>
				<category><![CDATA[Experiments]]></category>
		<category><![CDATA[2.5D]]></category>
		<category><![CDATA[experiment]]></category>
		<category><![CDATA[Fake 3D]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[flash player 10]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[webcam]]></category>

		<guid isPermaLink="false">http://nocreativity.com/blog/?p=717</guid>
		<description><![CDATA[[ Link ] I decided to play around with webcam feeds and 2.5D in Flash Player 10. Requires a webcam]]></description>
			<content:encoded><![CDATA[<p>[ <a href="http://labs.nocreativity.com/webcamrelief/"title="Webcam relief experiment"  target="_blank">Link</a> ] I decided to play around with webcam feeds and 2.5D in Flash Player 10. Requires a webcam</p>
]]></content:encoded>
			<wfw:commentRss>http://nocreativity.com/blog/webcamrelief/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>4 &#8220;WTF?!&#8221; moments during a Flex/AIR experiment</title>
		<link>http://nocreativity.com/blog/4-wtf-moments-during-a-flexair-experiment</link>
		<comments>http://nocreativity.com/blog/4-wtf-moments-during-a-flexair-experiment#comments</comments>
		<pubDate>Thu, 11 Jun 2009 11:56:30 +0000</pubDate>
		<dc:creator>Ronny</dc:creator>
				<category><![CDATA[Download]]></category>
		<category><![CDATA[Experiments]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Alchemy]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[cross platform]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[JPGEncoding]]></category>
		<category><![CDATA[Photo Booth]]></category>
		<category><![CDATA[timelapse]]></category>

		<guid isPermaLink="false">http://nocreativity.com/blog/?p=551</guid>
		<description><![CDATA[On a shiny day I was sitting inside, and I don&#8217;t know what bug just bit me, but I felt like experimenting with Flex and AIR (instead of heading outside into the light). For some reason I felt like creating a Photobooth clone with only one feature: Taking a snapshot every few seconds and saving [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-medium wp-image-558" title="picture-1462" src="http://nocreativity.com/blog-engine/wp-content/uploads/2009/06/picture-1462-278x300.jpg" alt="picture-1462" width="278" height="300" />On a shiny day I was sitting inside, and I don&#8217;t know what bug just bit me, but I felt like experimenting with Flex and AIR (instead of heading outside into the light). For some reason I felt like creating a Photobooth clone with only one feature: Taking a snapshot every few seconds and saving it to the disk. During my quest I came across a few findings that were either extremely weird or just plain awesome. Here goes my list of &#8216;WTF?!&#8217;<br />
(If you don&#8217;t like reading, but you do want to check out the AIR app, click <a href="http://nocreativity.com/stuff/Alchyboot.air" target="_blank">here</a>)<span id="more-551"></span></p>
<h2>HorizontalList and ItemRenderers in Flex</h2>
<p>I must&#8217;ve done something wrong&#8230; I can&#8217;t imagine this being so hard.<br />
What I did was: I used a simple HorizontalList component, set the columnWidth to 80, built my own itemrenderer and put them together. The itemrenderer basically loads a JPG and displays it. Seen as my images were larger than 80px I decided to do some maths the resize the image on the fly.<br />
To start with, i went into my itemrenderer, and traced the with of the bitmap, and the width of the itemrenderer itself. Just to make sure those properties are actually ready. First thing to notice: <em>this.width</em> inside the itemrenderer randomly traced 80 and 85.<img class="alignright" title="Flex" src="http://nocreativity.com/blog-engine/wp-content/uploads/2008/09/flex-icon.jpg" alt="" width="100" height="100" /></p>
<p>What the f-&#8230; Wait&#8230; Eh&#8230; No, what?</p>
<p>I didn&#8217;t really find out why that is, but if anybody feels like enlightning me: go right ahead. (After that, I noticed that sometimes the first or the last (or both) items in the list weren&#8217;t updating at all&#8230; I must be misunderstanding some fundamentals of the framework I guess&#8230; [Btw: I did NOT manage to fix this in a decent way, so at some point I gave up an threw it away...])</p>
<h2>The panel titlebar in Flex</h2>
<p>So this is AIR, right? Goodbye system chrome, hello you science-fiction-looking chrome! I created my own (very Flex-looking) chrome and disabled the system chrome. I wanted my app to be able to be moved around on the desktop&#8230; You know: Like windows do (not Windows&#8230;).<br />
I figured: Hell, the Panel component looks a lot like a basic window. Why not use it as the main window? So what&#8217;s the first thing a regular human brain would do? Right, you&#8217;ll try to get to the titleBar via the panel instance&#8230; But you can&#8217;t! I figured I must be misunderstanding the construction of the panel. So there I go, reading about the titleBar on the <a href="http://livedocs.adobe.com/flex/3/langref/mx/containers/Panel.html#titleBar" target="_blank" target="_blank">Panel Class page</a> in the Flex Livedocs. Most of you already know but just let me spell it out for you: It&#8217;s <em>protected</em>&#8230; So you can&#8217;t get to it right away&#8230; You have to built your own panel class that extends the original Panel class, and create your own public getter for the titleBar&#8230;</p>
<p>Excuse me: WTF? Oh, I think I understa&#8230; Oh, no I don&#8217;t: Why again?</p>
<p>No seriously: What&#8217;s the deal with that? I can see how you don&#8217;t want a setter there&#8230; But no getter? What good is that supposed to do? Anyway, let&#8217;s fix this&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">&lt;</span> <span style="color: #000066; font-weight: bold;">?</span>xml <span style="color: #004993;">version</span>=<span style="color: #990000;">&quot;1.0&quot;</span> encoding=<span style="color: #990000;">&quot;utf-8&quot;</span><span style="color: #000066; font-weight: bold;">?&gt;</span>
<span style="color: #000066; font-weight: bold;">&lt;</span>mx <span style="color: #000066; font-weight: bold;">:</span>Panel xmlns<span style="color: #000066; font-weight: bold;">:</span>mx=<span style="color: #990000;">&quot;http://www.adobe.com/2006/mxml&quot;</span> layout=<span style="color: #990000;">&quot;absolute&quot;</span> <span style="color: #004993;">width</span>=<span style="color: #990000;">&quot;400&quot;</span> <span style="color: #004993;">height</span>=<span style="color: #990000;">&quot;300&quot;</span><span style="color: #000066; font-weight: bold;">&gt;</span>
<span style="color: #000066; font-weight: bold;">&lt;/</span>mx<span style="color: #000066; font-weight: bold;">&gt;&lt;</span>mx <span style="color: #000066; font-weight: bold;">:</span>Script<span style="color: #000066; font-weight: bold;">&gt;</span>
<span style="color: #000066; font-weight: bold;">&lt;</span> <span style="color: #000066; font-weight: bold;">!</span><span style="color: #000000;">&#91;</span>CDATA<span style="color: #000000;">&#91;</span>
<span style="color: #0033ff; font-weight: bold;">import</span> mx<span style="color: #000066; font-weight: bold;">.</span>core<span style="color: #000066; font-weight: bold;">.</span>UIComponent<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> <span style="color: #0033ff; font-weight: bold;">get</span> theTitlebar<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span>UIComponent<span style="color: #000000;">&#123;</span>
<span style="color: #0033ff; font-weight: bold;">return</span> <span style="color: #0033ff; font-weight: bold;">this</span><span style="color: #000066; font-weight: bold;">.</span>titleBar<span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #000000;">&#125;</span>
<span style="color: #009900; font-style: italic;">// There are probably way easier/simpler ways than this...</span>
<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">&gt;</span>
<span style="color: #000066; font-weight: bold;">&lt;/</span>mx<span style="color: #000066; font-weight: bold;">&gt;</span></pre></div></div>

<p>And now I can use theTitlebar of my DraggablePanel class to actually drag my panel like a real window&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;">pnlMain<span style="color: #000066; font-weight: bold;">.</span>theTitlebar<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">MouseEvent</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">MOUSE_DOWN</span><span style="color: #000066; font-weight: bold;">,</span> startTheDrag<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> startTheDrag<span style="color: #000000;">&#40;</span>e<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">MouseEvent</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>
nativeWindow<span style="color: #000066; font-weight: bold;">.</span>startMove<span style="color: #000000;">&#40;</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>That looks pretty straight forward, and actually works like a charm&#8230; But why did I have to do this? Why is the titleBar protected??</p>
<h2>AS3 JPGEncoder for FP9, FP10 and the one on speedballs</h2>
<p>So at one point I actually got to building the thing I actually wanted to build: A Photobooth-clone that takes a picture and saves it to the harddrive. Drawing the bitmap went fine, saving the encoded JPG to disk went perfectly smooth as well. The AIR API is really fun to work with. Pretty straight foward&#8230; But I will get back to that in just a minute&#8230;</p>
<p>The problem at hand right now was the Bitmap encoding: I draw a bitmap (480 x 360) and I want to write it to disk. So I include the <a href="http://code.google.com/p/as3corelib/" target="_blank" target="_blank">AS3corelib</a> in my project and continue my quest. When testrunning I notice the application freezes while the bitmapdata is encoded. And not just for a moment. Noooo&#8230; For a full second (or longer)! I can hear you thinking: &#8216;A second&#8230;? So?&#8217;. Well if you want to shoot a picture every second this application will just completely freeze. And let&#8217;s just face the fact: it&#8217;s just plain annoying the have an application the freezes every few seconds for that amount of time.</p>
<p>So I started playing with quality settings, and bitmap sizes. All to no avail. The encoder is just too slow. <a href="http://Peterelst.com" target="_blank" target="_blank">Peter</a> suggested taking a look at the Vector implementation found <a href="http://www.bytearray.org/?p=775" target="_blank" target="_blank">here</a>. That went way faster already: Up to 4 times faster. But still: 0.3 seconds is pretty slow&#8230; So I read through the comments and run into the magic word: &#8216;<a href="http://labs.adobe.com/technologies/alchemy/" target="_blank" target="_blank">Alchemy</a>&#8216;. I haven&#8217;t been playing with Alchemy myself (mainly because I don&#8217;t know C), but I knew Alchemy would be the key to he solution of this problem. So I downloaded <a href="http://segfaultlabs.com/blog/post/asynchronous-jpeg-encoding" target="_blank" target="_blank">this SWC</a> (<a href="http://segfaultlabs.com/swf/alchemy/alchemyJpegUpdate_sv/alchemy_flex.zip" target="_blank" target="_blank">direct link</a>), implemented this version of the encoder, ran the script and&#8230;<br />
&#8230;.I went &#8216;WHAT THE FUUUUCK?&#8217; (You can see what that looks like below)</p>
<div style="text-align:center"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="368" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=5101218&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=ffff00&amp;fullscreen=1" /><embed type="application/x-shockwave-flash" width="480" height="368" src="http://vimeo.com/moogaloop.swf?clip_id=5101218&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=ffff00&amp;fullscreen=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></div>
<p>This video was made using the pictures Alchemy created. Alchemy was encoding these bitmaps in .05 seconds per frame! (I swear, I went on for at least 15 minutes WTF-ing over and over again&#8230;). So: From 1.2 seconds to 0.05 seconds&#8230; That&#8217;s about 24 times faster. Ain&#8217;t that amazing?</p>
<p>The coolest thing? I didn&#8217;t even have to compile the C code myself as I was given the .swc file. (Believe me I gave C compiling a try, but me and Terminal&#8230; It&#8217;s just not gonna happen&#8230;)</p>
<h2>File.nativePath and File.url in AIR</h2>
<p><img class="alignleft" title="AIR" src="http://nocreativity.com/blog-engine/wp-content/uploads/2008/09/air_icon_special.jpg" alt="" width="100" height="100" />The one thing I love about AIR? The combination of creating crossplatform applications using the tools I&#8217;m familiar with from online development. The keyword here is <em>crossplatform</em>. Creating AIR apps is supposed to be a straight forward process. You shouldn&#8217;t worry about platform specific issues. AIR is handling the heavy lifting for you. The only thing you need to do is create the app using the crossplatform API. Or so you would think.</p>
<p>One of the first things I noticed was the fact that the <em>file.nativePath </em>property isn&#8217;t all that crossplatform. And nobody can&#8217;t really explain why. Even <a href="http://theflashblog.com" target="_blank" target="_blank">Lee Brimelow</a> didn&#8217;t manage to explain that in <a href="http://www.gotoandlearn.com/play?id=42" target="_blank" target="_blank">his tutorial</a>&#8230;</p>
<p>I mean: How can the <em>native path</em> not be <em>cross platform</em>? It&#8217;s native to it&#8217;s own platform! (I really went WTF when learning that).</p>
<p>Apparently you can do anything using the <em>file.url</em> property. To me <em>file.nativePath</em> isn&#8217;t intended to be used when trying to access a file, but more intended to show the end-user where on the filesystem the file resides using a <em>platform native notation</em>.</p>
<p>Examples</p>
<ul>
<li>Windows XP: c:\Documents and Settings\noCreativity\My Documents\myFile.jpg</li>
<li>Windows Vista: c:\Users\noCreativity\My Documents\myFile.jpg</li>
<li>OSX: /Users/noCreativity/Documents/myFile.jpg</li>
</ul>
<p>instead of</p>
<ul>
<li>file:///c:/Documents%20and%Settings/noCreativity/My%20Documents/myFile.jpg</li>
<li>file:///Users/noCreativity/Documents/myFile.jpg</li>
</ul>
<p>I am no Adobe AIR expert so please, feel free to correct me. Because this really itches me. How can a crossplatform API have a property which is not crossplatform-compatible (and don&#8217;t get me started on the whole OSX Dock/menubar vs Windows Start Menu/taskbar thing&#8230; But somehow, that&#8217;s different&#8230;)</p>
<h2>Finally&#8230; The end&#8230;</h2>
<p>Yes, I had a hard time doing all this but I learned a lot! My conclusions?</p>
<p>I like Flex and how it enables you to rapidly create data driven applications, but I&#8217;m pretty sure I&#8217;d really have to look into the inner workings of the framework before trying to build something, using the framework&#8230; And basically that &#8216;really looking into it&#8217; ruins the mood for me&#8230; Definitely when experimenting.</p>
<p>Alchemy is amazing! I can&#8217;t wait to get a good C development environment up on my iMac and start playing with C and lean how I can get the best from both worlds. If you have got any decent suggestions on how to do that [without Terminal] feel free to tell me <img src='http://nocreativity.com/blog-engine/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /><br />
Oh and by the way: If you&#8217;re experimenting with Alchemy and you&#8217;re open-sourcing code or libraries, I encourage you to add a .swc file with the compiled C code. Thanks in advance!</p>
<p>I love the AIR API. Although that nativePath thing will keep haunting me until somebody can give me a straight answer, &#8217;cause I feel like a complete idiot right now.</p>
<p>Oh, and if you care: Feel free to check out the application!</p>
<p><strong>Download</strong>: <a href="http://nocreativity.com/blog-engine/wp-content/plugins/download-monitor/download.php?id=1" title="Alchyboot - Downloaded 287 times">Click</a>!</p>
]]></content:encoded>
			<wfw:commentRss>http://nocreativity.com/blog/4-wtf-moments-during-a-flexair-experiment/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Webcam motion detection coolness</title>
		<link>http://nocreativity.com/blog/webcam-motion-detection-coolness</link>
		<comments>http://nocreativity.com/blog/webcam-motion-detection-coolness#comments</comments>
		<pubDate>Sun, 18 Jan 2009 17:43:21 +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[detection]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[motion]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[webcam]]></category>
		<category><![CDATA[webcam motion]]></category>
		<category><![CDATA[webcam motion detection]]></category>

		<guid isPermaLink="false">http://nocreativity.com/blog/?p=355</guid>
		<description><![CDATA[A few weeks ago I had to create an innovative way to scroll in a page. I have seen tons of scrollbars in Flash and I found it hard to create something completely new. At one point I wondered if I could wire the scrollbar to a webcam using Actionscript&#8230; So I started experimenting around&#8230; [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://nocreativity.com/blog-engine/wp-content/uploads/2009/01/picture-1071.jpg"><img class="aligncenter size-large wp-image-357" title="Webcam motion detection: step by step development" src="http://nocreativity.com/blog-engine/wp-content/uploads/2009/01/picture-1071-1024x533.jpg" alt="Webcam motion detection: step by step development" width="491" height="256" /></a></p>
<p>A few weeks ago I had to create an innovative way to scroll in a page. I have seen tons of scrollbars in Flash and I found it hard to create something completely new. At one point I wondered if I could wire the scrollbar to a webcam using Actionscript&#8230; So I started experimenting around&#8230;</p>
<p>When I first started I quickly ran into a problem: How the hell do I know if anything is moving? So I actually got stuck right in the beginning.<br />
I went on a Google trip which led me to <a href="http://newmovieclip.wordpress.com/" target="_blank" target="_blank">Koen</a>&#8216;s post about <a href="http://newmovieclip.wordpress.com/2006/06/11/detect-and-locate-webcam-motion-in-flash-8/" target="_blank" target="_blank">motion detection</a>. Koen was checking all the pixels (using nested loops) to calculate color values. I figured this generated way too much overhead. There had to be a better/simpeler way.</p>
<p>In his post Koen mentioned an article, written by <a href="http://www.flashguru.co.uk/" target="_blank" target="_blank">Guy Watson</a>, concerning <a href="http://www.adobe.com/devnet/flash/articles/webcam_motion.html" target="_blank" target="_blank">an other way</a> to get motion detection going. To make things simple: Guy just takes 2 pictures &#8211; one of the previous frame, one of the current &#8211; puts them on top of eachother, and applies the difference blend mode to the upper one: Tadaaa! There we go! The &#8216;unchanged&#8217; pixels are blacked out. The remaining pixels are the difference in the picture&#8230; which reflects movement. <span id="more-355"></span></p>
<p>So I went back to Flash and put something similar together. All I had to do now was clean up the image, turn the difference remainings white, and detect what in the picture remains white.</p>
<p>That last part turned out to be quite tricky too. When I first got to that milestone I quickly checked the BitmapData class for intresting methods, but I didn&#8217;t find anything intresting. Later on, I talked to <a href="http://Peterelst.com" target="_blank" target="_blank">Peter Elst</a> and Koen at Flex Camp, and they told me to look again because there actually was a function: getColorBoundsRect()</p>
<p>There we go: that&#8217;s a solution right there! And it worked out just fine!<br />
You can test it for yourself in this <a href="http://labs.nocreativity.com/webcammotiondetection/"rel="shadowbox"  target="_blank">little test application</a> &#8211; requires a webcam (duh!)</p>
<h3>Download</h3>
<p>Flex Project source: <a href="http://labs.nocreativity.com/webcammotiondetection/source.zip">source.zip</a><br />
Webcam motion detector class (Actionscript 3): <a href="http://labs.nocreativity.com/webcammotiondetection/MotionDetector.zip">MotionDetector.zip</a></p>
<p>I was planning on adding a &#8216;sensitivity&#8217; property for motion detection but that turned out to be a bit harder. So I decided to postpone that for now (procrastination is a bitch <img src='http://nocreativity.com/blog-engine/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  )<br />
Feel free to suggest better ways of doing this. I&#8217;m still pretty sure I&#8217;m creating a bit too much overhead to make this work <img src='http://nocreativity.com/blog-engine/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://nocreativity.com/blog/webcam-motion-detection-coolness/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Playr 2.0 is coming!</title>
		<link>http://nocreativity.com/blog/playr-20-is-coming</link>
		<comments>http://nocreativity.com/blog/playr-20-is-coming#comments</comments>
		<pubDate>Wed, 12 Nov 2008 13:21:35 +0000</pubDate>
		<dc:creator>Ronny</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Everything else]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Open-source]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[ASP]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Playr 2.0]]></category>
		<category><![CDATA[PlayrDiscovr]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://nocreativity.com/blog/?p=232</guid>
		<description><![CDATA[I just wanted to update you guys on how the update for the next version of Playr is progressing. In the past week, I&#8217;ve been pretty busy adding the finishing  touches to the features and fixing the last few bugs that popped up. Most of the last-minute changes are a result of using the class [...]]]></description>
			<content:encoded><![CDATA[<p>I just wanted to update you guys on how the update for the next version of <a href="http://nocreativity.com/blog/playr-de-actionscript-3-music-player-class" target="_blank">Playr</a> is progressing.</p>
<p>In the past week, I&#8217;ve been pretty busy adding the finishing  touches to the features and fixing the last few bugs that popped up. Most of the last-minute changes are a result of using the class in <a href="http://nocreativity.com/blog/my-latest-project-walter-ego" target="_blank">one of my own projects</a>.</p>
<p>It&#8217;s then when I realized I&#8217;m missing some key features like adding the music directory, and some properties of the PlayrEvents. I also added some ear candy like fadeIn() and fadeOut() methods.</p>
<p>On a more functional note: I&#8217;ve abstracted the playlist to an independent class. So now you&#8217;re provided with lots and lots of ways to customize and manage your playlists.</p>
<p>The shuffle mode is now smart. In English that means the playlist remembers what songs have played and which ones haven&#8217;t.</p>
<p>Finally I&#8217;m happy to tell you guys won&#8217;t ever have to write an XML playlist file yourself. I&#8217;ve got a <a href="http://nocreativity.com/blog/playrdiscovr-de-playlistxml-bouwer" target="_blank">PHP4</a> and <a href="http://nocreativity.com/blog/playrdiscovr-update" target="_blank">PHP5</a> version of PlayrDiscovr which reads a directory and returns the corresponding XML listing the tracks and their properties.<br />
On top of that, I&#8217;ve got some help from other people (I still need to contact you guys) who are willing to help me out with building PlayrDiscover in ASP, Ruby and Python.</p>
<p>Even though I&#8217;m listing all of the new features, the Playr class is still the easiest way of implementing any kind of sound-feature in any Flash/Flex/AIR application. But the simplicity shouldn&#8217;t be a limitation, which it isn&#8217;t: you&#8217;re still able to build full-feature media-playing applications.</p>
<p>One of the little challenges I still have to tackle is the Tween problem. I&#8217;ve implemented fadeIn() and fadeOut() methods. Those methods actually tween the volume property of the Playr instance. The problem with that is when using the Playr class in a Flex project, you get a cool error message telling you it can&#8217;t import fl.transitions (which is the class package for the Tween class and the easing package).<br />
I still haven&#8217;t figured out how to work around this problem. If any of you have any suggestion on this problem, feel free to tell me about it.</p>
<p>I plan on releasing Playr 2.0 in the coming week (or 2) depending on PlayrDiscovr impementations, final changes, demo&#8217;s and site development (yes, I&#8217;m building a dedicated site for Playr <img src='http://nocreativity.com/blog-engine/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  ) Feel free to suggest other implementations you&#8217;d like <img src='http://nocreativity.com/blog-engine/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://nocreativity.com/blog/playr-20-is-coming/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex, Flash, AIR, Silverlight en ander ongedierte</title>
		<link>http://nocreativity.com/blog/flex-flash-air-silverlight-en-ander-ongedierte</link>
		<comments>http://nocreativity.com/blog/flex-flash-air-silverlight-en-ander-ongedierte#comments</comments>
		<pubDate>Wed, 01 Oct 2008 18:06:45 +0000</pubDate>
		<dc:creator>Ronny</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Blend]]></category>
		<category><![CDATA[Dreamweaver]]></category>
		<category><![CDATA[Expression]]></category>
		<category><![CDATA[Flash Lite]]></category>
		<category><![CDATA[Flash Player]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Visual studio]]></category>

		<guid isPermaLink="false">http://nocreativity.com/blog/?p=155</guid>
		<description><![CDATA[Ik heb in de laatste maanden gemerkt dat meer en meer verwarring ontstaat als het over Flash, Flex, AIR en Silverlight gaat. Blijkbaar weet een groot publiek niet wat het verschil is. Ikzelf ben al enkele jaren met Flash bezig, en gezien de snelle evolutie van de laatste 2 jaar kan ik me voorstellen dat [...]]]></description>
			<content:encoded><![CDATA[<p>Ik heb in de laatste maanden gemerkt dat meer en meer verwarring ontstaat als het over Flash, Flex, AIR en Silverlight gaat. Blijkbaar weet een groot publiek niet wat het verschil is.<br />
Ikzelf ben al enkele jaren met Flash bezig, en gezien de snelle evolutie van de laatste 2 jaar kan ik me voorstellen dat er verwarring ontstaat. Maar blijkbaar wordt er toch nog veel verkeerde informatie verspreid, waardoor zelfs schrijvers van magazines de foute weg op gaan.</p>
<p>Hieronder volgt een korte uitleg over deze termen. Ik heb er ook meteen de meest voor de hand liggende software pakketten bij geplaatst, want ook daar durft men soms verkeerd geïnformeerd zijn.<span id="more-155"></span></p>
<h3>Flash</h3>
<p><img class="alignleft size-full wp-image-156" title="flash-icon" src="http://nocreativity.com/blog-engine/wp-content/uploads/2008/09/flash-icon.jpg" alt="" width="100" height="94" /><strong>Omschrijving</strong>: Flash is een programma van Adobe waarmee SWF files kunnen gebouwd worden. Deze SWF bestanden worden vooral op het internet gebruikt, en spelen af in de Flash Player. De Flash Player is een krachtige light-weight plug-in voor webbrowsers (Firefox, Safari, Internet Explorer, Opera&#8230; ) die zowel op Windows, OS X alsook Linux beschikbaar is.</p>
<p><strong>Tools of the trade</strong>:</p>
<ul>
<li><a href="http://www.adobe.com/products/flash/" target="_blank" target="_blank">Adobe Flash</a></li>
</ul>
<p><strong>Voorbeelden van toepassingen</strong>:</p>
<ul>
<li><a href="http://youtube.com" target="_blank">Youtube</a>: De video&#8217;s worden afgespeeld in de Flash Player. De video-besturing is Flash-content. De video die afspeelt is Flash Video</li>
<li><a href="http://switchmw.com" target="_blank" target="_blank">Switch Media Works</a>: Een volledige Flash website</li>
</ul>
<p><strong>Links</strong>:</p>
<ul>
<li><a href="http://www.adobe.com/products/flash/" target="_blank" target="_blank">Adobe Flash</a></li>
<li><a href="http://www.adobe.com/go/gntray_dl_getflashplayer" target="_blank" target="_blank">Adobe Flash Player plug-in</a></li>
</ul>
<h3>Flash Lite</h3>
<p><img class="alignleft size-full wp-image-157" title="logoflashlite" src="http://nocreativity.com/blog-engine/wp-content/uploads/2008/09/logoflashlite.jpg" alt="" width="100" height="93" /><strong>Omschrijving</strong>: Flash Lite is een runtime die vooral op GSM&#8217;s, PDA&#8217;s, en andere handhelds (zoals de <a href="http://www.chumby.com/" target="_blank" target="_blank">Chumby</a>) ingezet wordt. Bedoeling hiervan is dat Flash developers nog een groter publiek kunnen bereiken door kleine applicaties te kunnen maken, die op de kleinere draagbare toestellen kunnen bekeken en gebruikt worden.</p>
<p><strong>Tools of the trade</strong>:</p>
<ul>
<li><a href="http://www.adobe.com/products/flash/" target="_blank" target="_blank">Adobe Flash</a></li>
</ul>
<p><strong>Voorbeelden van toepassingen</strong>:</p>
<ul>
<li><a href="http://nocreativity.com/blog/flash-on-the-beach-mobile" target="_blank">Flash on the beach mobile</a></li>
<li><a href="http://www.flashfocus.nl/forum/showthread.php?t=41351" target="_blank" target="_blank">Flash in the can mobile guide</a></li>
</ul>
<p><strong>Links</strong>:</p>
<ul>
<li><a href="http://www.adobe.com/products/flashlite/" target="_blank" target="_blank">Adobe Flash Lite</a></li>
<li><a href="http://www.adobe.com/products/flash/" target="_blank" target="_blank">Adobe Flash </a></li>
</ul>
<h3>Flex</h3>
<p><img class="alignleft size-full wp-image-158" title="flex-icon" src="http://nocreativity.com/blog-engine/wp-content/uploads/2008/09/flex-icon.jpg" alt="" width="100" height="100" /><strong>Omschrijving</strong>: Flex is in het leven geroepen met het oog om snel Flash applicaties te maken. Flex steunt op het gebruik van Flex componenten, die deel uitmaken van het Flex framework. Die maken het mogelijk om snel data-driven applicaties te maken. Flex projecten resulteren &#8211; net als Flash &#8211; in een (of meerdere) SWF bestanden, die gewoon in je browser, in de Flash Player plug-in zullen werken. Je hoeft dus geen andere plug-in te downloaden om sites (gebouwd in Flex) te bekijken.</p>
<p><strong>Tools of the trade</strong>:</p>
<ul>
<li><a href="http://www.adobe.com/products/flex/" target="_blank" target="_blank">Adobe Flex Builder</a></li>
<li><a href="http://www.eclipse.org/" target="_blank" target="_blank">Eclipse</a> + <a href="http://fdt.powerflasher.com/" target="_blank" target="_blank">FDT plug-in</a></li>
<li>Je favoriete tekst editor + (gratis) <a href="http://www.adobe.com/products/flex/flexdownloads/index.html" target="_blank" target="_blank">Flex SDK</a></li>
</ul>
<p><strong>Voorbeeld van toepas</strong>singen:</p>
<ul>
<li><a href="http://flex.org/showcase/" target="_blank" target="_blank">Flex Showcase</a>: Deze site is gemaakt in Flex, en toont nog eens heel erg coole voorbeelden van wat allemaal met Flex kan.</li>
</ul>
<p><strong>Links</strong>:</p>
<ul>
<li><a href="http://www.adobe.com/products/flex/" target="_blank" target="_blank">Adobe Flex Builder</a></li>
<li><a href="http://www.adobe.com/go/gntray_dl_getflashplayer" target="_blank" target="_blank">Adobe Flash Player plug-in</a></li>
<li><a href="http://fdt.powerflasher.com/" target="_blank" target="_blank">PowerFlasher FDT</a></li>
</ul>
<h3>AIR</h3>
<p><img class="alignleft size-full wp-image-159" title="air_icon_special" src="http://nocreativity.com/blog-engine/wp-content/uploads/2008/09/air_icon_special.jpg" alt="" width="100" height="100" /><strong>Omschrijving</strong>: AIR is een afkorting voor Adobe Integrated Runtime. Met andere woorden: AIR maakt het mogelijk om Flash/Flex applicaties op je desktop te draaien. Beter nog: AIR geeft je de mogelijkheid om de vaardigheden die je opgebouwd hebt tijdens het werken met Flex/Flash/HTML &amp; Javascript nu te gebruiken bij het bouwen van desktop applicaties. AIR bestaat voor zowel Windows, OS X aslsook Linux. AIR is dus platform onafhankelijk.</p>
<p><strong>Tools of the trade</strong>:</p>
<ul>
<li><a href="http://www.adobe.com/products/flash/" target="_blank" target="_blank">Adobe Flash</a></li>
<li><a href="http://www.adobe.com/products/flex/" target="_blank" target="_blank">Adobe Flex Builder</a></li>
<li><a href="http://www.adobe.com/products/dreamweaver/" target="_blank" target="_blank">Adobe Dreamweaver</a></li>
<li>Je favoriete tekst editor + (gratis) <a href="http://www.adobe.com/products/air/tools/sdk/" target="_blank" target="_blank">AIR SDK</a></li>
</ul>
<p><strong>Voorbeelden van toepassingen</strong>:</p>
<ul>
<li><a href="http://www.twhirl.org/" target="_blank" target="_blank">Twhirl</a></li>
<li><a href="http://desktop.ebay.com/" target="_blank" target="_blank">eBay Desktop</a></li>
</ul>
<p><strong>Links</strong>:</p>
<ul>
<li><a href="http://www.adobe.com/products/air/" target="_blank" target="_blank">Adobe AIR </a></li>
<li><a href="http://" target="_blank" target="_blank">Adobe Flash</a></li>
<li><a href="http://www.adobe.com/products/flex/" target="_blank" target="_blank">Adobe Flex Builder</a></li>
</ul>
<h3>Silverlight</h3>
<p><img class="alignleft size-full wp-image-160" title="silverlight" src="http://nocreativity.com/blog-engine/wp-content/uploads/2008/09/silverlight.jpg" alt="" width="100" height="74" /><strong>Omschrijving</strong>: Microsoft Silverlight is &#8211; net zoals Flash &#8211; een media formaat dat vooral op het web toegepast wordt, en dus in een plug-in van je browser afspeelt. Hoewel men Silverlight de &#8216;Flash Killer&#8217; noemt is Silverlight tot vandaag relatief weinig ingezet.</p>
<p><strong>Tools of the trade</strong>:</p>
<ul>
<li><a href="http://www.microsoft.com/expression/products/Overview.aspx?key=blend" target="_blank" target="_blank">Microsoft Expression Blend</a></li>
<li><a href="http://www.microsoft.com/belux/msdn/defyallchallenges/nl/?wt.srch=1" target="_blank" target="_blank">Microsoft Visual Studio</a></li>
</ul>
<p><strong>Voorbeelden van toepassingen</strong>:</p>
<ul>
<li><a href="http://silverlight.net/Showcase/" target="_blank" target="_blank">Silverlight Showcase</a></li>
</ul>
<p><strong>Links</strong>:</p>
<ul>
<li><a href="http://www.microsoft.com/expression/products/Overview.aspx?key=blend" target="_blank" target="_blank">Microsoft Expression Blend</a></li>
<li><a href="http://www.microsoft.com/belux/msdn/defyallchallenges/nl/?wt.srch=1" target="_blank" target="_blank">Microsoft Visual Studio</a></li>
<li><a href="http://www.microsoft.com/silverlight/resources/install.aspx" target="_blank" target="_blank">Microsoft Silverlight plug-in</a></li>
</ul>
<p>Er zijn nog zoveel andere dingen te zeggen &#8211; en die zelfs al gezegd zijn &#8211; zodat ik me bijna verplicht voel om nog enkele links naar andere leeswaardige artikels te posten.</p>
<ul>
<li>Peter Elst &#8211; <a href="http://www.peterelst.com/blog/2008/09/26/flash-vs-silverlight-20/" target="_blank" target="_blank">Flash vs Silverlight 2.0</a></li>
<li>Peter Elst &#8211; <a href="http://www.peterelst.com/blog/2008/05/15/adobe-air-versus-microsoft-silverlight/" target="_blank" target="_blank">Flash vs Silverlight</a></li>
<li>John Dowdell &#8211; <a href="http://weblogs.macromedia.com/jd/archives/2008/03/whats_up_with_r.html" target="_blank" target="_blank">What&#8217;s up with reporters?</a></li>
<li>Endrone &#8211; <a href="http://blog.endrone.com/2007/07/10/the-war-of-ria-flash-vs-silverlight/" target="_blank" target="_blank">The war: Flash vs Silverlight</a></li>
<li>FlashFocus &#8211; <a href="http://www.flashfocus.nl/forum/showthread.php?t=31391" target="_blank" target="_blank">Silverlight en JavaFX: Flash krijgt concurrentie</a></li>
<li>Tweakers &#8211; <a href="http://tweakers.net/nieuws/47139/microsofts-silverlight-gaat-strijd-aan-met-flash.html" target="_blank" target="_blank">Microsofts Silverlight gaat de strijd aan met Flash</a></li>
<li>Keith Peters &#8211; <a href="http://www.bit-101.com/blog/?p=1110" target="_blank" target="_blank">Silverlight again</a></li>
</ul>
<p><em><span style="font-size:11px;">Dank aan <a href="http://peterelst.com" target="_blank" target="_blank">Peter Elst</a> voor het nalezen, en aanvullen van dit artikel. Thanks, Peter!!</span></em></p>
]]></content:encoded>
			<wfw:commentRss>http://nocreativity.com/blog/flex-flash-air-silverlight-en-ander-ongedierte/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Adobe AIR voor Linux</title>
		<link>http://nocreativity.com/blog/adobe-air-voor-linux</link>
		<comments>http://nocreativity.com/blog/adobe-air-voor-linux#comments</comments>
		<pubDate>Mon, 31 Mar 2008 13:38:42 +0000</pubDate>
		<dc:creator>Ronny</dc:creator>
				<category><![CDATA[Open-source]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://nocreativity.com/blog/adobe-air-voor-linux</guid>
		<description><![CDATA[Een paar weken geleden heb ik gepost over de officiële release van Adobe AIR, de cross-platform runtime van Adobe die het mogelijk maakt voor developers om met hun bestaande kennis en kunnen programma&#8217;s voor de desktop te maken, zonder zich daarbij tot een platform te moeten beperken.  Toen ik dat artikel schreef was Adobe AIR [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://nocreativity.com/blog-engine/wp-content/uploads/2008/02/air_icon_special.jpg" align="left" height="106" width="106" /> Een paar weken geleden heb ik gepost over de officiële release van Adobe AIR, de cross-platform runtime van Adobe die het mogelijk maakt voor developers om met hun bestaande kennis en kunnen programma&#8217;s voor de desktop te maken, zonder zich daarbij tot een platform te moeten beperken.  Toen ik dat artikel schreef was Adobe AIR nog niet inzetbaar op het Linux platform. Sinds vandaag is dat anders!</p>
<p><a href="http://www.webkitchen.be" target="_blank" target="_blank">Serge Jespers</a> <a href="http://www.webkitchen.be/2008/03/31/air-alpha-version-now-available-for-linux/" target="_blank" target="_blank">berichtte</a> vandaag dat de eerste <a href="http://www.adobe.com/go/airlinux" target="_blank" target="_blank">alpha versie van de runtime voor Linux </a>beschikbaar is. Op deze manier wordt het bekende open-source platform weer toegankelijker! Verder is er vandaag ook een update beschikbaar geworden voor de <a href="http://www.adobe.com/go/flexbuilder_linux" target="_blank" target="_blank">Flex Builder voor Linux</a>. Deze zou AIR support moeten geven zodat developers ook op Linux aan de slag kunnen gaan!</p>
<p>En om het plaatje af te maken, <a href="http://linux-foundation.org/weblogs/press/2008/03/30/adobe-joins-linux-foundation-with-focus-on-linux-for-web-20-applications/" target="_blank" target="_blank">maakt Adobe bekend dat ze zich bij de Linux Foundation aansluiten</a>.</p>
<p>Dit lijkt mij heel goed en fijn nieuws!</p>
]]></content:encoded>
			<wfw:commentRss>http://nocreativity.com/blog/adobe-air-voor-linux/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Playr: De ActionScript 3 music player class!</title>
		<link>http://nocreativity.com/blog/playr-de-actionscript-3-music-player-class</link>
		<comments>http://nocreativity.com/blog/playr-de-actionscript-3-music-player-class#comments</comments>
		<pubDate>Wed, 19 Mar 2008 14:46:13 +0000</pubDate>
		<dc:creator>Ronny</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Download]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Open-source]]></category>
		<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[docs]]></category>
		<category><![CDATA[Downloads]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[MusicPlayer]]></category>
		<category><![CDATA[Playr]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://nocreativity.com/blog/playr-de-actionscript-3-music-player-class</guid>
		<description><![CDATA[Update: Er is een nieuwe versie van deze klasse die je hier kan vinden. De download van deze versie heb ik verwijderd om die reden. Ik heb gisteren de laatste wijzigingen aangebracht aan de vroegere MusicPlayer class. Zoals het er nu uitziet lijkt deze klasse af, voor een eerste ronde echt gebruik, keiharde feedback en [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update:</strong> <em>Er is <a href="http://nocreativity.com/blog/playr-20-is-here">een nieuwe versie</a> van deze klasse die je hier kan vinden. De download van deze versie heb ik verwijderd om die reden.</em></p>
<p><em> </em></p>
<p>Ik heb gisteren de laatste wijzigingen aangebracht aan de vroegere MusicPlayer class. Zoals het er nu uitziet lijkt deze klasse af, voor een eerste ronde echt gebruik, keiharde feedback en vele suggesties.</p>
<p>Belangrijke wijzigingen zijn:</p>
<ul>
<li> Classnames, en package names zijn aangepast.
<ul>
<li>De klasse zelf heet nu <strong>Playr </strong>in plaats van MusicPlayer.</li>
<li>Package name is aangepast. com.noCreativity.MusicPlayer is nu <strong>com.nocreativity.playr</strong> (met dank aan Peter Elst voor de best practice tip <img src='http://nocreativity.com/blog-engine/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  )</li>
</ul>
</li>
<li> Shuffle mode toegevoegd</li>
<li>Trackprogress kan nu ook opgevraagd worden</li>
<li>Singletrack werkt nu volledig</li>
<li>Bug ivm repeat weggewerkt</li>
</ul>
<h3>Wat doet Playr?</h3>
<p>Playr is een Flash Actionscript 3 klasse die het maken van een volwaardige music player in Flash/Flex/AIR reduceert tot enkele regels code. Of je nu maar 1 loop wilt laten spelen, of een volledige playlist wilt 	afspelen in Flash/Flex/AIR: Playr kan het sneller dan jij!</p>
<p>Playr kan je gebruiken om een enkele loop af te spelen, of voor volledige XML afspeellijsten te laten 	afspelen. Zowel shuffle als repeat zijn mogelijk. Ook de interactiviteit met de gebruiker kan snel worden toegevoegd.<br />
De Playr class is ontworpen met snelheid en gemak voor ogen<span id="more-72"></span></p>
<h3>Hoe gebruik ik Playr?</h3>
<p>3 Korte voorbeelden hoe je de Playr class kunt inzetten.</p>
<p>Minimaal<br />
Je wilt gewoon één track laten afspelen.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">import</span> com<span style="color: #000066; font-weight: bold;">.</span>nocreativity<span style="color: #000066; font-weight: bold;">.</span>playr<span style="color: #000066; font-weight: bold;">.*;</span>
<span style="color: #6699cc; font-weight: bold;">var</span> myPlayer<span style="color: #000066; font-weight: bold;">:</span>Playr = <span style="color: #0033ff; font-weight: bold;">new</span> Playr<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
myPlayer<span style="color: #000066; font-weight: bold;">.</span>singleTrack = <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span>
myPlayer<span style="color: #000066; font-weight: bold;">.</span>loadTrack<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;music/myTrack.mp3&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
myPlayer<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">play</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

<p>Minimaal<br />
Je wilt een volledige playlist afspelen zonder interactie of weer te geven informatie.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">import</span> com<span style="color: #000066; font-weight: bold;">.</span>nocreativity<span style="color: #000066; font-weight: bold;">.</span>playr<span style="color: #000066; font-weight: bold;">.*;</span>
<span style="color: #6699cc; font-weight: bold;">var</span> myPlayer<span style="color: #000066; font-weight: bold;">:</span>Playr = <span style="color: #0033ff; font-weight: bold;">new</span> Playr<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
myPlayer<span style="color: #000066; font-weight: bold;">.</span>autoPlay=<span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span>
myPlayer<span style="color: #000066; font-weight: bold;">.</span>loadPlaylist<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;playlist.xml&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

<p>Maximaal</p>
<p>Je wilt een volwaardige music player maken, met alles erop en eraan.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">import</span> com<span style="color: #000066; font-weight: bold;">.</span>nocreativity<span style="color: #000066; font-weight: bold;">.</span>playr<span style="color: #000066; font-weight: bold;">.*;</span>
<span style="color: #6699cc; font-weight: bold;">var</span> myPlayer<span style="color: #000066; font-weight: bold;">:</span>Playr = <span style="color: #0033ff; font-weight: bold;">new</span> Playr<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
myPlayer<span style="color: #000066; font-weight: bold;">.</span>autoPlay=<span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span>
myPlayer<span style="color: #000066; font-weight: bold;">.</span>repeat = <span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000066; font-weight: bold;">;</span>
myPlayer<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">volume</span> = <span style="color: #000000; font-weight:bold;">100</span><span style="color: #000066; font-weight: bold;">;</span>
myPlayer<span style="color: #000066; font-weight: bold;">.</span>shuffle = <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span>
myPlayer<span style="color: #000066; font-weight: bold;">.</span>loadPlaylist<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;playlist.xml&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
myPlayer<span style="color: #000066; font-weight: bold;">.</span>registerPlayButton<span style="color: #000000;">&#40;</span>btnPlay<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
myPlayer<span style="color: #000066; font-weight: bold;">.</span>registerStopButton<span style="color: #000000;">&#40;</span>btnStop<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
myPlayer<span style="color: #000066; font-weight: bold;">.</span>registerPauseButton<span style="color: #000000;">&#40;</span>btnPause<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
myPlayer<span style="color: #000066; font-weight: bold;">.</span>registerNextButton<span style="color: #000000;">&#40;</span>btnNext<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
myPlayer<span style="color: #000066; font-weight: bold;">.</span>registerPreviousButton<span style="color: #000000;">&#40;</span>btnPrevious<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
myPlayer<span style="color: #000066; font-weight: bold;">.</span>registerMuteButton<span style="color: #000000;">&#40;</span>btnMute<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
myPlayer<span style="color: #000066; font-weight: bold;">.</span>ID3SourceEnabled =<span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
myPlayer<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span>PlayrEvent<span style="color: #000066; font-weight: bold;">.</span>SONGINFO<span style="color: #000066; font-weight: bold;">,</span>infoHandler<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
myPlayer<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span>PlayrEvent<span style="color: #000066; font-weight: bold;">.</span>SONG_PROGRESS<span style="color: #000066; font-weight: bold;">,</span>songprogressHandler<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
myPlayer<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span>PlayrEvent<span style="color: #000066; font-weight: bold;">.</span>LOAD_PROGRESS<span style="color: #000066; font-weight: bold;">,</span>loadprogressHandler<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #339966; font-weight: bold;">function</span> songprogressHandler<span style="color: #000000;">&#40;</span>e<span style="color: #000066; font-weight: bold;">:</span>PlayrEvent<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>
txtSongProgress<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">text</span> = <span style="color: #990000;">&quot;Time elapsed: &quot;</span> <span style="color: #000066; font-weight: bold;">+</span>  myPlayer<span style="color: #000066; font-weight: bold;">.</span>trackProgress<span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span>
<span style="color: #339966; font-weight: bold;">function</span> loadprogressHandler<span style="color: #000000;">&#40;</span>e<span style="color: #000066; font-weight: bold;">:</span>PlayrEvent<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>
txtLoadProgress<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">text</span> = <span style="color: #990000;">&quot;Load progress: &quot;</span><span style="color: #000066; font-weight: bold;">;</span> <span style="color: #000066; font-weight: bold;">+</span> e<span style="color: #000066; font-weight: bold;">.</span>loadprogress<span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #339966; font-weight: bold;">function</span> infoHandler<span style="color: #000000;">&#40;</span>e<span style="color: #000066; font-weight: bold;">:</span>PlayrEvent<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>
txtTrackInfo<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">text</span> = myPlayer<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">artist</span> <span style="color: #000066; font-weight: bold;">+</span> <span style="color: #990000;">&quot; - &quot;</span> <span style="color: #000066; font-weight: bold;">+</span> myPlayer<span style="color: #000066; font-weight: bold;">.</span>trackName<span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span>myPlayer<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">album</span> <span style="color: #000066; font-weight: bold;">!</span>= <span style="color: #990000;">&quot;&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#123;</span>
txtTrackInfo<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">appendText</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot; (&quot;</span><span style="color: #000066; font-weight: bold;">+</span>myPlayer<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">album</span><span style="color: #000066; font-weight: bold;">+</span><span style="color: #990000;">&quot;)&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span>
txtTrackInfo<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">appendText</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot; | &quot;</span> <span style="color: #000066; font-weight: bold;">+</span> myPlayer<span style="color: #000066; font-weight: bold;">.</span>trackDuration<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<h3>Playlist.xml?</h3>
<p>Hoe deze noemt maakt in feite niet echt veel uit, zolang de inhoud volgens <a href="http://nocreativity.com/Playr/playlist.xml">deze structuur</a> is.<br />
Betekenis van de verschillende nodes:</p>
<ul>
<li>Artist: Naam van de artiest</li>
<li>Title: Naam van het liedje</li>
<li>TotalTime: Totale duur van het liedje in seconden</li>
<li>Filename: bestandspad naar de af te spelen MP3 file. (absoluut of relatief).</li>
</ul>
<h3>Documentatie over Playr?</h3>
<p>Deze is er en kun je <a href="http://nocreativity.com/Playr/docs/" target="_blank">hier</a> vinden.</p>
<h3>Download</h3>
<p>Download de Playr class <a href="http://nocreativity.com/Playr/Playr-1.0.zip" target="_blank">hier</a>.</p>
<h3>Feedback &amp; Suggesties</h3>
<p>Heb je vragen, of zijn er onduidelijkheden? Schiet maar raak, ik bijt niet!<br />
Zijn er onvolmaaktheden, of heb je dat geniale extra dat deze klasse nog tekort heeft? Laat mij het weten, en ik zal er zeker naar kijken.<br />
Gebruik je deze  class en ben je er tevreden mee? Ik hoor het graag. Laat ook zien in welk(e) project(en) je de class inzet!</p>
<p>Veel plezier!</p>
<p><img src="http://creativecommons.nl/wp-content/themes/ccnl/img/licenses/BY-SA.png" border="0" alt="Naamsvermelding &amp; Gelijk delen" width="69" height="32" /> <span style="font-size: 11px">Ik release de Playr class en de PlayrEvent class onder de <a href="http://creativecommons.org/licenses/by-sa/3.0/nl/legalcode"title="Naams vermelding &amp; gelijk delen"  target="_blank">Creative Commons</a> license. Dat wil zeggen dat je alles in deze classes mag aanpassen zolang je er een verwijzing naar de originele auteur ( ik dus <img src='http://nocreativity.com/blog-engine/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  ) in laat staan, en je deze classes met dezelfde rechten verder verdeeld.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://nocreativity.com/blog/playr-de-actionscript-3-music-player-class/feed</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>Adobe AIR goes live</title>
		<link>http://nocreativity.com/blog/adobe-air-goes-live</link>
		<comments>http://nocreativity.com/blog/adobe-air-goes-live#comments</comments>
		<pubDate>Mon, 25 Feb 2008 15:49:11 +0000</pubDate>
		<dc:creator>Ronny</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[Adobe]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://nocreativity.com/blog/adobe-air-goes-live</guid>
		<description><![CDATA[Na meer dan 1 jaar is het eindelijk zover: Adobe Integrated Runtime verlaat zijn beta fase, en is zomee officieel gereleased. Dat is goed nieuws voor de RIA developers onder ons. Want vanaf nu kunnen we dus echte applicaties maken met de kennis die we hebben vanuit onze webdevelopment ervaringen. En het kost niets! Cooler [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://nocreativity.com/blog-engine/wp-content/uploads/2008/02/air_icon_special.jpg" alt="Adobe AIR Logo" align="left" />Na meer dan 1 jaar is het eindelijk zover: <a href="http://www.adobe.com/products/air/" target="_blank" target="_blank">Adobe Integrated Runtime</a> verlaat zijn beta fase, en is zomee officieel gereleased.</p>
<p>Dat is goed nieuws voor de RIA developers onder ons. Want vanaf nu kunnen we dus echte applicaties maken met de kennis die we hebben vanuit onze webdevelopment ervaringen. En het kost niets! Cooler nog: het is crossplatform!</p>
<p><strong>Wat is Adobe AIR?</strong></p>
<p>Adobe Integrated Runtime is een  runtime omgeving  die het mogelijk maakt voor RIA developers om met hun gekende technologieën zoals Flash, Flex of HTML/Javascript interactieve applicaties te maken die rechtstreeks op je computer draaien, en toch meteen in contact staan met online applicaties zoals <a href="http://www.twitter.com" target="_blank" target="_blank">Twitter</a>, <a href="http://www.ebay.com" target="_blank" target="_blank">eBay</a>, <a href="http://www.pownce.com" target="_blank">Pownce</a>, of <a href="http://www.mtv.com/" target="_blank" target="_blank">MTV</a>.</p>
<p>AIR biedt een rijke API voor bestaande developers die toegang geeft tot de verschillende mogelijkheden van de computer zoals bijvoorbeeld het bestandssysteem zodat je met een kleine AIR app makkelijk een bestand kunt openen, bewerken, opslaan, of zelfs uploaden. Zo zijn er talrijke mogelijkheden.</p>
<p><strong>Waarom Adobe AIR?<br />
</strong>Menig software developer zal hier natuurlijk scheef naar kijken, en zich afvragen: &#8220;Waarom zou ik Adobe AIR gebruiken als ik VB.net of C# heb?&#8221;</p>
<p>Het antwoord is simpel:</p>
<ul>
<li><strong>AIR is flexibel! </strong><br />
Wil je een applicatie schrijven die gebaseerd is op Flash, of op HTML en Javascript? Het maakt niet uit. AIR apps kunnen met beiden gebouwd worden.</li>
<li><strong>AIR laat jou kiezen!<br />
</strong>Ben jij altijd al fan geweest van de Flash IDE? Of gaat het ontwikkelen sneller in Flex Builder? Of ligt Flash jou niet zo, en ben je meer een HTML/Javascript developer in Dreamweaver? AIR beperkt jou workflow niet: Je kunt AIR apps ontwikkelen en releasen vanuit zowel <a href="http://www.adobe.com/products/air/develop/flash/" target="_blank" target="_blank">Flash</a>, <a href="http://www.adobe.com/products/air/develop/flex/" target="_blank">Flex Builder</a>, en <a href="http://www.adobe.com/products/air/develop/ajax/" target="_blank" target="_blank">Dreamweaver</a>.</li>
<li><strong>AIR is vooruitstrevend!<br />
</strong>Tegenwoordig is het onmogelijk om &#8216;Windows-only&#8217; of &#8216;Linux-only&#8217; te denken. Met de hedendaagse ontwikkeling moet je gewoon met alle platformen rekening houden. Adobe AIR doet dat voor jou! Jij maakt gewoon jouw applicatie in de omgeving naar keuze, en compiled een &#8216;AIR&#8217; file, die in de runtime van zowel Mac OSX als Windows alsook Linux*.</li>
<li><strong>AIR is free!</strong> <span style="font-size: 8px;">(Klink best grappig, he? <img src='http://nocreativity.com/blog-engine/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  )</span><br />
Applicaties ontwerpen in AIR kost jou niets! Als je over Flash, Flex of Dreamweaver beschikt kun je gewoon aan de slag! Waar je voor Visual Studio veel geld moet betalen om applicaties te kunnen maken, moet je voor AIR gewoon een gratis update (voor <a href="http://www.adobe.com/products/air/develop/flash/" target="_blank" target="_blank">Flash</a>, <a href="http://www.adobe.com/products/air/develop/flex/" target="_blank">Flex Builder</a>, of <a href="http://www.adobe.com/products/air/develop/ajax/" target="_blank" target="_blank">Dreamweaver</a> ) downloaden van de Adobe site. Je betaalt niets, en je kunt zooooveel meer en je moet er niets voor bijleren! Je huidige kennis en je huidige tools zijn alles wat je nodig hebt!</li>
</ul>
<p>Ik herinner me Adobe Live van vorig jaar nog, waar Greg Rewis regelmatig op het podium stond te roepen: &#8216;Is that cool?!&#8217;.<br />
Ik heb hier maar 1 antwoord voor: This <strong>is</strong> cool!</p>
<p><strong>Update</strong>: Ward heeft me attent gemaakt op het feit dat er Express versies zijn van Visual Studio die gratis te verkrijgen zijn en het mogelijk maken om gratis software te ontwikkelen binnen het Microsoft .NET framework.</p>
<p><span style="font-size: 8px;">* De Adobe Integrated Runtime is op het moment van dit schrijven nog niet gereleased, maar Adobe belooft om hier zo snel mogelijk verandering in te brengen. In Adobe we trust <img src='http://nocreativity.com/blog-engine/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </span></p>
]]></content:encoded>
			<wfw:commentRss>http://nocreativity.com/blog/adobe-air-goes-live/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Open-source MP3 Player Class: MusicPlayer (Beta release)</title>
		<link>http://nocreativity.com/blog/open-source-mp3-player-class-musicplayer-beta-release</link>
		<comments>http://nocreativity.com/blog/open-source-mp3-player-class-musicplayer-beta-release#comments</comments>
		<pubDate>Sun, 30 Dec 2007 00:45:35 +0000</pubDate>
		<dc:creator>Ronny</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Download]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Open-source]]></category>
		<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[MP3]]></category>
		<category><![CDATA[MusicPlayer]]></category>
		<category><![CDATA[Playr]]></category>

		<guid isPermaLink="false">http://nocreativity.com/blog/open-source-mp3-player-class-musicplayer-beta-release</guid>
		<description><![CDATA[Update: Er is een nieuwe versie van deze klasse die je hier kan vinden. De download van deze versie heb ik verwijderd om die reden. Na lang wachten heb ik vandaag eindelijk al mijn ditjes en datjes in mijn MusicPlayer class kunnen afwerken. De player beschikt nu over de volgende properties: Autoplay Playlist laden (XML) [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update:</strong> <em>Er is <a href="http://nocreativity.com/blog/playr-20-is-here">een nieuwe versie</a> van deze klasse die je hier kan vinden. De download van deze versie heb ik verwijderd om die reden.</em></p>
<p>Na lang wachten heb ik vandaag eindelijk al mijn ditjes en datjes in mijn MusicPlayer class kunnen afwerken.</p>
<p>De player beschikt nu over de volgende properties:</p>
<ul>
<li>Autoplay</li>
<li>Playlist laden (<a href="http://nocreativity.com/MusicPlayer/playlist.xml"title="Bekijk een voorbeeld van de playlist.xml" >XML</a>)</li>
<li>De buttonacties instellen</li>
<li> 2 progress events (Vooruitgang van inladen van de track, alsook de vooruitgang van de track zelf)</li>
<li>Enkele track inladen</li>
<li>Repeat</li>
<li>ID3 ondersteuning</li>
</ul>
<p>Wat nog op het programma staat:</p>
<ul>
<li>Shuffle</li>
<li>Visualisatie module</li>
</ul>
<p>Er zijn een aantal wijzigingen in de class gebeurd, waardoor je waarschijnlijk je code zult moeten aanpassen in je huidige projecten. Zo is de import regel iets gewijzigd, gezien de MusicPlayer class zijn eigen events nodig heeft (PlayerEvents). Ik heb de hiërarchie dan ook ietje gewijzigd zodat je geen meerdere imports moet uitvoeren.</p>
<p>De code ziet er voortaan zo uit:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">import</span> com<span style="color: #000066; font-weight: bold;">.</span>nocreativity<span style="color: #000066; font-weight: bold;">.</span>playr<span style="color: #000066; font-weight: bold;">.*;</span>
<span style="color: #6699cc; font-weight: bold;">var</span> myPlayer<span style="color: #000066; font-weight: bold;">:</span>Playr = <span style="color: #0033ff; font-weight: bold;">new</span> Playr<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
myPlayer<span style="color: #000066; font-weight: bold;">.</span>autoPlay=<span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span>
myPlayer<span style="color: #000066; font-weight: bold;">.</span>repeat = <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span>
myPlayer<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">volume</span> = <span style="color: #000000; font-weight:bold;">100</span><span style="color: #000066; font-weight: bold;">;</span>
myPlayer<span style="color: #000066; font-weight: bold;">.</span>loadPlaylist<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;playlist.xml&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
myPlayer<span style="color: #000066; font-weight: bold;">.</span>registerPlayButton<span style="color: #000000;">&#40;</span>btnPlay<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
myPlayer<span style="color: #000066; font-weight: bold;">.</span>registerStopButton<span style="color: #000000;">&#40;</span>btnStop<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
myPlayer<span style="color: #000066; font-weight: bold;">.</span>registerPauseButton<span style="color: #000000;">&#40;</span>btnPause<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
myPlayer<span style="color: #000066; font-weight: bold;">.</span>registerNextButton<span style="color: #000000;">&#40;</span>btnNext<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
myPlayer<span style="color: #000066; font-weight: bold;">.</span>registerPreviousButton<span style="color: #000000;">&#40;</span>btnPrevious<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
myPlayer<span style="color: #000066; font-weight: bold;">.</span>registerMuteButton<span style="color: #000000;">&#40;</span>btnMute<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
myPlayer<span style="color: #000066; font-weight: bold;">.</span>ID3SourceEnabled =<span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
myPlayer<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span>PlayerEvent<span style="color: #000066; font-weight: bold;">.</span>SONGINFO<span style="color: #000066; font-weight: bold;">,</span>infoHandler<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
myPlayer<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span>PlayerEvent<span style="color: #000066; font-weight: bold;">.</span>SONG_PROGRESS<span style="color: #000066; font-weight: bold;">,</span>songprogressHandler<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
myPlayer<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span>PlayerEvent<span style="color: #000066; font-weight: bold;">.</span>LOAD_PROGRESS<span style="color: #000066; font-weight: bold;">,</span>loadprogressHandler<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #339966; font-weight: bold;">function</span> songprogressHandler<span style="color: #000000;">&#40;</span>e<span style="color: #000066; font-weight: bold;">:</span>PlayerEvent<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>
txtSongProgress<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">text</span> = <span style="color: #990000;">&quot;song progress: &quot;</span> <span style="color: #000066; font-weight: bold;">+</span> e<span style="color: #000066; font-weight: bold;">.</span>songprogress<span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span>
<span style="color: #339966; font-weight: bold;">function</span> loadprogressHandler<span style="color: #000000;">&#40;</span>e<span style="color: #000066; font-weight: bold;">:</span>PlayerEvent<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>
txtLoadProgress<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">text</span> = <span style="color: #990000;">&quot;load progress: &quot;</span> <span style="color: #000066; font-weight: bold;">+</span> e<span style="color: #000066; font-weight: bold;">.</span>loadprogress<span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #339966; font-weight: bold;">function</span> infoHandler<span style="color: #000000;">&#40;</span>e<span style="color: #000066; font-weight: bold;">:</span>PlayerEvent<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>
txtTrackInfo<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">text</span> = myPlayer<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">artist</span><span style="color: #000066; font-weight: bold;">;</span>
txtTrackInfo<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">appendText</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot; - &quot;</span> <span style="color: #000066; font-weight: bold;">+</span> myPlayer<span style="color: #000066; font-weight: bold;">.</span>trackName<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
txtTrackInfo<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">appendText</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot; (&quot;</span> <span style="color: #000066; font-weight: bold;">+</span>myPlayer<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">album</span><span style="color: #000066; font-weight: bold;">+</span><span style="color: #990000;">&quot;)&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
txtTrackInfo<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">appendText</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot; | &quot;</span> <span style="color: #000066; font-weight: bold;">+</span> myPlayer<span style="color: #000066; font-weight: bold;">.</span>trackDuration<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>In het bovenstaande voorbeeld is ook de <em>ID3SourceEnabled</em> gebruikt: deze boolean laat je kiezen of je de ID3tag van je MP3 bestanden wilt gebruiken als bron voor de artist, album en trackName eigenschappen. Als je deze waarde op <em>true</em> zet wordt de <em>artist</em>, <em>album</em> en <em>title</em> tag uit je XML bestand genegeerd, en kun je je XML bestand dus gewoon korter maken. Zet je dit op <em>false</em> wordt je XML bestand als bron van deze eigenschappen gebruikt. Dus als je ID3tags niet naar behoren zijn ingevuld is dit een secundaire oplossing.</p>
<p>Ook de XML heeft een kleine wijziging ondergaan: Er is een nieuwe tag bijgekomen (totalTime): de totale tijd (in seconden) die het betreffende liedje duurt. Dus in geval van een track van 3 minuten en 28 seconden komt dat op 208 (3*60+28) uit. Deze waarde moet handmatig ingegeven worden. Het kan ook via ID3tag maar is precies omslachtig&#8230; Als iemand de gouden tip heeft is dit welkom.</p>
<h3>Download:</h3>
<p style="padding: 10px 10px 10px 20px; background-color: #dfffff">De huidige versie kun je <a href="http://nocreativity.com/MusicPlayer/MusicPlayer_1.0_Beta_1.zip"title="Download de zip met de class bestanden" >hier</a> downloaden.<br />
Een voorbeeld hoe de XML er moet uitzien staat <a href="http://nocreativity.com/MusicPlayer/playlist.xml"title="Bekijk een voorbeeld van de playlist.xml" >hier</a>.<br />
Een voorbeeld kun je <a href="http://nocreativity.com/MusicPlayer/voorbeeld.zip"title="Download een voorbeeld van het gebruik van de MusicPlayer class" >hier</a> downloaden.<br />
De documentatie heb ik nog niet geupdate, maar dat komt er zo snel mogelijk aan.</p>
<p><img src="http://creativecommons.nl/wp-content/themes/ccnl/img/licenses/BY-SA.png" border="0" alt="Naamsvermelding &amp; Gelijk delen" width="69" height="32" /> <span style="font-size: 10px">Ik release de MusicPlayer class en de PlayerEvent class onder de <a href="http://creativecommons.org/licenses/by-sa/3.0/nl/legalcode"title="Naams vermelding &amp; gelijk delen"  target="_blank">Creative Commons</a> license. Dat wil zeggen dat je alles in deze classes mag aanpassen zolang je er een verwijzing naar de originele auteur ( ik dus <img src='http://nocreativity.com/blog-engine/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ) in laat staan, en je deze classes met dezelfde rechten verder verdeeld.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://nocreativity.com/blog/open-source-mp3-player-class-musicplayer-beta-release/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Open-source MP3 Player Class: MusicPlayer</title>
		<link>http://nocreativity.com/blog/open-source-mp3-player-class-musicplayer</link>
		<comments>http://nocreativity.com/blog/open-source-mp3-player-class-musicplayer#comments</comments>
		<pubDate>Sun, 30 Sep 2007 11:30:23 +0000</pubDate>
		<dc:creator>Ronny</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Download]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Open-source]]></category>
		<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[MusicPlayer]]></category>
		<category><![CDATA[Playr]]></category>

		<guid isPermaLink="false">http://nocreativity.com/blog/open-source-mp3-player-class-musicplayer</guid>
		<description><![CDATA[Update: Er is een nieuwe versie van deze klasse die je hier kan vinden. De download van deze versie heb ik verwijderd om die reden. Ik heb zonet mijn eerste Actionscript 3 experiment afgewerkt. Het resultaat is een musicplayer class die iedereen voor z&#8217;n eigen doeleinden mag gebruiken. Voor mij was het een leuke en [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update:</strong> <em>Er is <a href="http://nocreativity.com/blog/playr-20-is-here">een nieuwe versie</a> van deze klasse die je hier kan vinden. De download van deze versie heb ik verwijderd om die reden.</em></p>
<p>Ik heb zonet mijn eerste Actionscript 3 experiment afgewerkt.<br />
Het resultaat is een musicplayer class die iedereen voor z&#8217;n eigen doeleinden mag gebruiken.<br />
Voor mij was het een leuke en uitgebreide oefening, maar gezien ik niet meer verder zal werken aan de Actionscript 2 versie van de musicplayer lijkt dit me een mooi vervolg.</p>
<p>Wat Actionscript 3 zelf betreft: Ik ben er helemaal van onder de indruk. Even aanpassen, maar eens ik het door had was het erg makkelijk om over te schakelen.</p>
<p>Ik heb de class gebouwd met het oog op simpel bij gebruik. De uiteindelijke gebruiker van de class moet zo weinig mogelijk zelf doen. Dat is me ook gelukt.</p>
<p>Je kunt gebruik maken van een XML bestand om je playlist op te maken: <a href="http://www.nocreativity.com/MusicPlayer/playlist.xml"title="Klik hier om een voorbeeld van het XML bestand te zien" >Voorbeeld</a></p>
<p>Voorbeeld 1:<br />
Erg minimaal gebruik van de class.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">import</span> com<span style="color: #000066; font-weight: bold;">.</span>nocreativity<span style="color: #000066; font-weight: bold;">.</span>playr<span style="color: #000066; font-weight: bold;">.*;</span>
<span style="color: #6699cc; font-weight: bold;">var</span> myPlayer<span style="color: #000066; font-weight: bold;">:</span>Playr = <span style="color: #0033ff; font-weight: bold;">new</span> Playr<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
myPlayer<span style="color: #000066; font-weight: bold;">.</span>autoPlay=<span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span>
myPlayer<span style="color: #000066; font-weight: bold;">.</span>loadPlaylist<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;playlist.xml&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

<p>Voorbeeld 2:<br />
Gebruik van de buttonhandlers, repeat eigenschap, en volume door middel van de class.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">import</span> com<span style="color: #000066; font-weight: bold;">.</span>nocreativity<span style="color: #000066; font-weight: bold;">.</span>playr<span style="color: #000066; font-weight: bold;">.*;</span>
<span style="color: #6699cc; font-weight: bold;">var</span> myPlayer<span style="color: #000066; font-weight: bold;">:</span>Playr = <span style="color: #0033ff; font-weight: bold;">new</span> Playr<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
myPlayer<span style="color: #000066; font-weight: bold;">.</span>autoPlay=<span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span>
myPlayer<span style="color: #000066; font-weight: bold;">.</span>repeat = <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span>
myPlayer<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">volume</span> = <span style="color: #000000; font-weight:bold;">100</span><span style="color: #000066; font-weight: bold;">;</span>
myPlayer<span style="color: #000066; font-weight: bold;">.</span>loadPlaylist<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;playlist.xml&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
myPlayer<span style="color: #000066; font-weight: bold;">.</span>registerPlayButton<span style="color: #000000;">&#40;</span>btnPlay<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
myPlayer<span style="color: #000066; font-weight: bold;">.</span>registerStopButton<span style="color: #000000;">&#40;</span>btnStop<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
myPlayer<span style="color: #000066; font-weight: bold;">.</span>registerPauseButton<span style="color: #000000;">&#40;</span>btnPause<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
myPlayer<span style="color: #000066; font-weight: bold;">.</span>registerNextButton<span style="color: #000000;">&#40;</span>btnNext<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
myPlayer<span style="color: #000066; font-weight: bold;">.</span>registerPreviousButton<span style="color: #000000;">&#40;</span>btnPrevious<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
myPlayer<span style="color: #000066; font-weight: bold;">.</span>registerMuteButton<span style="color: #000000;">&#40;</span>btnMute<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

<blockquote><p>-Nieuwe versie <a href="http://nocreativity.com/Playr/Playr-1.0.zip">hier</a> te vinden-<a href="http://www.nocreativity.com/MusicPlayer/docs"></a></p></blockquote>
<p>Indien je vragen, opmerkingen, suggesties hebt: Aarzel niet om ze hier te stellen!<br />
Ontdek je bugs, of zijn er onvolmaaktheden? Post ze hier!<br />
Gelijk welke reden dan ook: laat me iets weten.</p>
<p>Indien je mijn class gebruikt, laat me iets weten zodat ik een idee heb of jullie er iets aan hebben!</p>
<p>Veel succes en plezier ermee <img src='http://nocreativity.com/blog-engine/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://nocreativity.com/blog/open-source-mp3-player-class-musicplayer/feed</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

