<?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>TOKI WOKI. Blog &#187; Dev</title>
	<atom:link href="http://toki-woki.net/blog/cat/dev/feed" rel="self" type="application/rss+xml" />
	<link>http://toki-woki.net/blog</link>
	<description>Visual, music, dev...</description>
	<lastBuildDate>Wed, 01 Sep 2010 14:11:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Evnt &#8212; Custom AS3 Event File Generator</title>
		<link>http://toki-woki.net/blog/p2029-evnt-custom-as3-event-file-generator</link>
		<comments>http://toki-woki.net/blog/p2029-evnt-custom-as3-event-file-generator#comments</comments>
		<pubDate>Tue, 27 Jul 2010 10:56:31 +0000</pubDate>
		<dc:creator>Quentin T</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[as]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[white]]></category>

		<guid isPermaLink="false">http://toki-woki.net/blog/?p=2029</guid>
		<description><![CDATA[I recently started working with Robotlegs on a daily basis and I've never had to write that much custom event classes, so I felt like it was starting to be a little bit boring... That's why I wrote a pretty basic/simple app that does hard part for you! Simply enter you custom event's class name [...]]]></description>
			<content:encoded><![CDATA[<p>I recently started working with <a href="http://www.robotlegs.org/">Robotlegs</a> on a daily basis and I've never had to write that much custom event classes, so I felt like it was starting to be a little bit boring... That's why I wrote a pretty basic/simple app that does hard part for you!</p>
<p><a href="http://toki-woki.net/p/Evnt/"><img class="aligncenter size-full wp-image-2030" title="Evnt" src="http://toki-woki.net/blog/wp-content/uploads/2010/07/Evnt.gif" alt="" width="560" height="100" /></a></p>
<p>Simply enter you custom event's class name and package, drop in some constants and properties: you're all set!</p>
<p><span id="more-2029"></span>Pro-tips:</p>
<ol>
<li>Reorder the constants and properties by dragging and dropping them</li>
<li>Use custom types for the properties, imports will be taken care of for you</li>
<li>Hit "Copy to Clipboard" or "Save As..." for a quick export!</li>
</ol>
<p>Project is brand new so it might require some fixes or improvements... If you have ideas, please share!</p>
<p>And before you ask: no, it wasn't written with Robotlegs... But it's <a href="http://code.google.com/p/as3-bits/source/browse/trunk/apps/Evnt/src/net/tw/app/evnt/Evnt.mxml">OpenSource</a> so if you want to take a spin and write the RL version of it, you'll be able to do so!</p>
<p>Hope this helps!</p>

<p><small>Post color: <span style='padding-left:2px; padding-right:2px; background-color:#ffffff; color:#4b4b4b'>#ffffff &#x25a0;</span></small></p>]]></content:encoded>
			<wfw:commentRss>http://toki-woki.net/blog/p2029-evnt-custom-as3-event-file-generator/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Fotolia Desktop</title>
		<link>http://toki-woki.net/blog/p1974-fotolia-desktop</link>
		<comments>http://toki-woki.net/blog/p1974-fotolia-desktop#comments</comments>
		<pubDate>Fri, 25 Jun 2010 10:04:51 +0000</pubDate>
		<dc:creator>Quentin T</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[air]]></category>
		<category><![CDATA[as]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[photo]]></category>
		<category><![CDATA[white]]></category>

		<guid isPermaLink="false">http://toki-woki.net/blog/?p=1974</guid>
		<description><![CDATA[Hey! Another free AIR app! This time that ain't no side project I made on my free time for some obscure users, but rather a big thingy for a big company. Namely Fotolia. I did all of the coding part (ActionScript 3, Flex 4) and Steaw is responsible for the UI and all graphics. The app [...]]]></description>
			<content:encoded><![CDATA[<p>Hey! Another free AIR app!  This time that ain't no side project I made on my free time for some obscure users, but rather a big thingy for a big company. Namely <a href="http://www.fotolia.com/">Fotolia</a>.</p>
<p style="text-align: center;"><a class="img" href="http://www.fotolia.com/desktop"><img class="aligncenter" title="Fotolia Desktop" src="http://toki-woki.net/blog/wp-content/uploads/2010/06/fotolia-main.jpg" alt="" width="560" height="373" /></a></p>
<p>I did all of the coding part (ActionScript 3, Flex 4) and <a href="http://www.steaw.com/">Steaw</a> is responsible for the UI and all graphics.  <span id="more-1974"></span>The app is basically a solution for power-users, providing most of the functionnalities of the website and adding some more (such as direct download and local library). Allowing you to search, browse preview and buy all types of medias, including video and vectors. You can also log into your account and store your favorites in a lightbox or create and fill galleries.<br />
<img style="float: right; margin-left: 10px;" title="Fotolia Desktop - Log In" src="http://toki-woki.net/blog/wp-content/uploads/2010/06/fotolia-log.jpg" alt="" width="203" height="274" /><br />
This is my first multi-lingual app: to this day it provides 13 translations including Japanese, Chinese and other funny looking languages!</p>
<h3>Flex 4</h3>
<p>This is also my first big real-life project with Flex 4 and I have to say it's way better/easier than Flex 3. Really.  What changed my life is the way it handles states and component customization via skins... Oh boy, this is easy!</p>
<h3>AIR 2.0</h3>
<p>Yep, using the brand new AIR 2.0.2, buddy. What for? Mainly for global error handling and the almighty openWithDefaultApplication (for both folder and medias). I've also heard this version of the runtime is faster and lighter, and we all like that.</p>
<h3>OpenSource</h3>
<p>As for every project I work on, I try to have some OpenSource bits so that anyone can benefit from the work and time I spent on it. I asked Fotolia if the AS3 API I was going to write could be OpenSource'd and guess what, they accepted. So here it is, based on the as3-rpclib and on the as3 Signals logic: <a href="http://code.google.com/p/fotolia-as3-api/">fotolia-as3-api</a>. I implemented most of (if not all) features of <a href="http://www.fotolia.com/Services/API/Documentation">their official API</a> so building an AS3 app off of that should be pretty easy, do so!</p>
<h3>Go get it!</h3>
<p>Yeah, <a href="http://www.fotolia.com/desktop">go get it</a>.</p>

<p><small>Post color: <span style='padding-left:2px; padding-right:2px; background-color:#ffffff; color:#4b4b4b'>#ffffff &#x25a0;</span></small></p>]]></content:encoded>
			<wfw:commentRss>http://toki-woki.net/blog/p1974-fotolia-desktop/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>#air24h</title>
		<link>http://toki-woki.net/blog/p1959-air24h</link>
		<comments>http://toki-woki.net/blog/p1959-air24h#comments</comments>
		<pubDate>Tue, 22 Jun 2010 10:10:58 +0000</pubDate>
		<dc:creator>Quentin T</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[air]]></category>
		<category><![CDATA[gray]]></category>
		<category><![CDATA[paris]]></category>
		<category><![CDATA[real-life]]></category>

		<guid isPermaLink="false">http://toki-woki.net/blog/?p=1959</guid>
		<description><![CDATA[This is how the Adobe AIR Challenge (that took place in Paris this week-end) looked like: lots of young and fresh folks ready to spend 24 hours building an AIR app. Pretty happy the 3 apps I supported all made it to the podium and can't wait to play with Digitas' Flickr app! Nice job, [...]]]></description>
			<content:encoded><![CDATA[<p>This is how the <a href="http://www.adobeairchallenge.com/">Adobe AIR Challenge</a> (that took place in Paris this week-end) looked like: lots of young and fresh folks ready to spend 24 hours building an AIR app.</p>
<p style="text-align: center;"><img class="aligncenter" title="Adobe AIR Challenge" src="http://toki-woki.net/blog/wp-content/uploads/2010/06/adobe-air-challenge.jpg" alt="" width="560" height="373" /></p>
<p>Pretty happy the 3 apps I supported all made it to the podium and can't wait to play with Digitas' Flickr app! Nice job, fellows.</p>
<p>See <a href="http://www.flickr.com/groups/air24h/">pics at Flickr</a>, <a href="http://www.vimeo.com/videos/search:adobe%20air%20challenge/a610ce31">vids at Vimeo</a> and wait for the apps: they should be out really soon.</p>

<p><small>Post color: <span style='padding-left:2px; padding-right:2px; background-color:#e2e2e2; color:#2e2e2e'>#e2e2e2 &#x25a0;</span></small></p>]]></content:encoded>
			<wfw:commentRss>http://toki-woki.net/blog/p1959-air24h/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adobe AIR Challenge</title>
		<link>http://toki-woki.net/blog/p1950-adobe-air-challenge</link>
		<comments>http://toki-woki.net/blog/p1950-adobe-air-challenge#comments</comments>
		<pubDate>Thu, 17 Jun 2010 12:54:27 +0000</pubDate>
		<dc:creator>Quentin T</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[Off topic]]></category>
		<category><![CDATA[air]]></category>
		<category><![CDATA[paris]]></category>
		<category><![CDATA[real-life]]></category>
		<category><![CDATA[red]]></category>

		<guid isPermaLink="false">http://toki-woki.net/blog/?p=1950</guid>
		<description><![CDATA[The Adobe AIR Challenge will begin tomorrow at 3pm in Paris, I happen to be a part of the jury so I will have to review and judge all of the 15 apps made by the 15 2-member teams. If you're interested follow the #air24h hashtag on Twitter and watch the event (there will be [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.adobeairchallenge.com/">Adobe AIR Challenge</a> will begin tomorrow at 3pm in Paris, I happen to be <a href="http://www.adobeairchallenge.com/#event">a part of the jury</a> so I will have to review and judge all of the 15 apps made by the <a href="http://www.adobeairchallenge.com/#teams">15 2-member teams</a>.</p>
<p>If you're interested follow the <a href="http://twitter.com/search?q=%23air24h">#air24h</a> hashtag on Twitter and watch the event (there will be a live broadcast online)! A <a href="http://www.flickr.com/groups/air24h/">Flickr group</a> also has been set up.</p>
<p>Make sure to also download and test the apps where they're done!</p>

<p><small>Post color: <span style='padding-left:2px; padding-right:2px; background-color:#b01c1f; color:#ffd0d3'>#b01c1f &#x25a0;</span></small></p>]]></content:encoded>
			<wfw:commentRss>http://toki-woki.net/blog/p1950-adobe-air-challenge/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex locale bugs</title>
		<link>http://toki-woki.net/blog/p1894-flex-locale-bugs</link>
		<comments>http://toki-woki.net/blog/p1894-flex-locale-bugs#comments</comments>
		<pubDate>Thu, 03 Jun 2010 11:00:28 +0000</pubDate>
		<dc:creator>Quentin T</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[air]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[green]]></category>

		<guid isPermaLink="false">http://toki-woki.net/blog/?p=1894</guid>
		<description><![CDATA[Warning: techy post for once; sorry about that regular folks. Looking for something nicer than cryptic bug fixes? Have a look around here! So here we go: I'm working on a big multi-lingual AIR app within Flash Builder and just received the locale files from my client today (made with Lupo). Couldn't wait to see [...]]]></description>
			<content:encoded><![CDATA[<p>Warning: techy post for once; sorry about that regular folks. Looking for something nicer than cryptic bug fixes? Have a look <a href="http://epictype.tumblr.com">around here</a>!</p>
<p>So here we go: I'm working on a big multi-lingual AIR app within Flash Builder and just received the locale files from my client today (made <a href="http://www.dehats.com/drupal/?q=node/87">with Lupo</a>).</p>
<p>Couldn't wait to see what it looked like in Japanese and in all other languages supported (13, to be precise) so I copied the "locale" folder into my project, updated the "Additional compiler arguments" with "<em>-locale de_DE en_GB en_US es_ES fr_FR it_IT ja_JP pl_PL pt_BR pt_PT ru_RU tr_TR zh_CN -allow-source-path-overlap=true -source-path=locale/{locale}</em>" and refreshed the project. Which broke, saying "<em>unable to open '[blablah]\frameworks\locale\en_GB'</em>".<span id="more-1894"></span></p>
<p>"Ouch", I thought. Flex doesn't support Great Britain's English?</p>
<p>In fact en_GB was not the only locale to break the project, so I Googled around and found that copying your Flex framework en_US directory and renaming it to the missing locale could do the trick. For example I copied "<em>C:\tools\flex4-air1.5.3\frameworks\locale\en_US</em>" to "<em>C:\tools\flex4-air1.5.3\frameworks\locale\en_GB</em>" (I also did that for tr_TR, pt_PT and pl_PL)... Not the nicest solution but lookin' good anyways!</p>
<p>Almost.</p>
<p>I then stumbled upon a lovely "Internal build error". But that's cool.</p>
<p>I can't explain how I found how to fix this but I did: some of the locale files (named Main.properties) where having lines with only a back-slash in them (\). I simply removed those lines everywhere I found them and that was it.</p>
<p>I don't know if this has anything to do with Lupo, or else; but it's fixed and yes: the app looks nice in Japanese, thank you.</p>

<p><small>Post color: <span style='padding-left:2px; padding-right:2px; background-color:#399400; color:#edffb4'>#399400 &#x25a0;</span></small></p>]]></content:encoded>
			<wfw:commentRss>http://toki-woki.net/blog/p1894-flex-locale-bugs/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Dok &#8212; AS3 Doc. UI</title>
		<link>http://toki-woki.net/blog/p1855-dok-as3-doc-ui</link>
		<comments>http://toki-woki.net/blog/p1855-dok-as3-doc-ui#comments</comments>
		<pubDate>Tue, 25 May 2010 18:45:05 +0000</pubDate>
		<dc:creator>Quentin T</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[Visual]]></category>
		<category><![CDATA[air]]></category>
		<category><![CDATA[as]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[gray]]></category>
		<category><![CDATA[illustrator]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[photoshop]]></category>
		<category><![CDATA[ui]]></category>

		<guid isPermaLink="false">http://toki-woki.net/blog/?p=1855</guid>
		<description><![CDATA[Meet Dok, my latest and nicest AIR app to this day! Always looking for help when writing AS3 for Flash, Flex and AIR? Think Adobe's reference is rich but browsing it sucks? Well, I did too. So I wrote this little thingy that loads, parses and caches help pages and then presents them in a [...]]]></description>
			<content:encoded><![CDATA[<p>Meet <a href="http://toki-woki.net/p/Dok/">Dok</a>, my latest and nicest AIR app to this day!</p>
<p style="text-align: center;"><a class="img" href="http://toki-woki.net/p/Dok/"><img class="aligncenter" title="Dok" src="http://toki-woki.net/blog/wp-content/uploads/2010/05/logo.png" alt="" width="192" height="100" /></a></p>
<p><a href="http://toki-woki.net/p/Dok/"></a>Always looking for help when writing AS3 for Flash, Flex and AIR? Think Adobe's reference is rich but browsing it sucks? Well, I did too. So I wrote this little thingy that loads, parses and caches help pages and then presents them in a slick and quick UI!</p>
<p><span id="more-1855"></span></p>
<p>Since this app is only intended for devs and therefore may not be very interesting to others, I decided it should look good. So I tried my best and worked hard on those pixels and styles (colors and textures inspired by <a href="http://www.artlebedev.com/everything/reflectius/">that sweet clock</a>)... Jump to the <a href="http://toki-woki.net/p/Dok/">project page</a> for life-size screenshot!</p>
<p>This project is absolutely OpenSource, from top to bottom. AS3 classes, MXML, Illustrator and Photoshop files, PNGs and so on... <a href="http://code.google.com/p/as3-bits/source/browse/trunk/apps/Dok/">Help yourself</a>.</p>

<p><small>Post color: <span style='padding-left:2px; padding-right:2px; background-color:#d3d5dd; color:#1f2129'>#d3d5dd &#x25a0;</span></small></p>]]></content:encoded>
			<wfw:commentRss>http://toki-woki.net/blog/p1855-dok-as3-doc-ui/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Shortcodes for Drupal</title>
		<link>http://toki-woki.net/blog/p1699-shortcodes-for-drupal</link>
		<comments>http://toki-woki.net/blog/p1699-shortcodes-for-drupal#comments</comments>
		<pubDate>Thu, 18 Mar 2010 21:41:51 +0000</pubDate>
		<dc:creator>Quentin T</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[gray]]></category>
		<category><![CDATA[illustrator]]></category>
		<category><![CDATA[logo]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://toki-woki.net/blog/?p=1699</guid>
		<description><![CDATA[WordPress' Shortcode API is a really cool thing, and since I'm working on a Drupal site these days I've been looking for something similar. Unfortunately I couldn't find anything... There are some implementations out there but the ones I found and tested always come pre-bundled with specific tags and don't always provide an extensible and [...]]]></description>
			<content:encoded><![CDATA[<p>WordPress' <a href="http://codex.wordpress.org/Shortcode_API">Shortcode API</a> is a really cool thing, and since I'm working on a Drupal site these days I've been looking for something similar. Unfortunately I couldn't find anything... There are some implementations <a href="http://drupal.org/project/video_filter">out there</a> but the ones I found and tested always come pre-bundled with specific tags and don't always provide an extensible and stable logic.</p>
<p>So I made mine!</p>
<p style="text-align: center;"><img class="size-full wp-image-1700 aligncenter" title="Shortcodes for Drupal" src="http://toki-woki.net/blog/wp-content/uploads/2010/03/shortcodes-drupal.gif" alt="" width="300" height="370" /></p>
<p><span id="more-1699"></span>Most of my work simply consisted in copying/pasting the code in WordPress' <a href="http://core.trac.wordpress.org/browser/trunk/wp-includes/shortcodes.php">shortcodes.php</a> and binding it into a Drupal filter. Easy enough.</p>
<p>Now if you want to use it, you have to:</p>
<ol>
<li><a href="http://toki-woki.net/blog/wp-content/uploads/2010/03/shortcodes-0.1.zip">Get the module</a></li>
<li>Add it to your "modules" directory</li>
<li>Enable it</li>
<li>Add it to one of your setup's filter bundle</li>
<li>Write your own module where you'd implement one or more Shortcodes (<em>via</em> add_shortcode) and make sure you add "dependencies[] = shortcodes" in your .info file</li>
</ol>
<p>You might experience a nasty "Call to undefined function <em>add_shortcode</em>". If so, you have to change you module implementation's weight, either directly in your database, or thanks to the cool <a href="http://drupal.org/project/util">Utility</a> module. Set it to 10 and you're set!</p>

<p><small>Post color: <span style='padding-left:2px; padding-right:2px; background-color:#1f1f1f; color:#d3d3d3'>#1f1f1f &#x25a0;</span></small></p>]]></content:encoded>
			<wfw:commentRss>http://toki-woki.net/blog/p1699-shortcodes-for-drupal/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>AIR: ELS slow?</title>
		<link>http://toki-woki.net/blog/p1614-encryptedlocalstore-slow</link>
		<comments>http://toki-woki.net/blog/p1614-encryptedlocalstore-slow#comments</comments>
		<pubDate>Tue, 26 Jan 2010 21:41:22 +0000</pubDate>
		<dc:creator>Quentin T</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[air]]></category>
		<category><![CDATA[as]]></category>
		<category><![CDATA[blue]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://toki-woki.net/blog/?p=1614</guid>
		<description><![CDATA[This post is a techy one, so if you don't write AIR apps or if you think this wouldn't be enough to show off during coffee break I recommend something funnier. Working on a big fat AIR app (more than 400 Mb) I noticed something quite strange: using EncryptedLocalStore get/setItem methods happened to be slow, [...]]]></description>
			<content:encoded><![CDATA[<p>This post is a techy one, so if you don't write AIR apps or if you think this wouldn't be enough to show off during coffee break I recommend <a href="http://www.dailymotion.com/video/xbv4gr">something funnier</a>.<span id="more-1614"></span></p>
<p>Working on a big fat AIR app (more than 400 Mb) I noticed something quite strange: using <a href="http://livedocs.adobe.com/flex/3/langref/flash/data/EncryptedLocalStore.html">EncryptedLocalStore</a> get/setItem methods happened to be slow, I mean very slow, but like, slow as hell (like 5 to 10 seconds per call) but only after launching the app, and not after. Something that I never noticed before ; neither with other AIR apps, nor for this one before I added its heavy content... And the tricky part is that it only occurred with a compiled app, but not within ADL.</p>
<p>I googled a bit and found <a href="http://groups.google.com/group/air-tight/browse_thread/thread/6e71bc21adb06e46/955f696cfd2e51d0">this thread</a> which is mainly about the stronglyBound parameter for setItem, but its last post by <a href="http://blogs.adobe.com/simplicity/">Oliver Goldman</a> rang my bell:</p>
<blockquote><p>The first time ELS is accessed the application's signature needs to be verified, regardless of whether or not stronglyBound is set. If stronglyBound is set, then the signature is re-verified as the application is running. Either way, it's expensive if you have a big application.</p></blockquote>
<p>Small app: fast, fat app: slow as hell. Lesson learned...</p>
<p>And this is true both for Flash and HTML/JS AIR apps. So if you don't need your data to be encrypted I highly recommend using <a href="http://livedocs.adobe.com/flex/3/langref/flash/net/SharedObject.html">SharedObject</a> (or <a href="http://blog.crankybit.com/notes-adobe-air-local-data-storage-options/">else</a>) instead. As far as I'm concerned the first calls dropped from 5/10 seconds to a few milliseconds.</p>
<p>Bingo.</p>

<p><small>Post color: <span style='padding-left:2px; padding-right:2px; background-color:#100040; color:#c4b4f4'>#100040 &#x25a0;</span></small></p>]]></content:encoded>
			<wfw:commentRss>http://toki-woki.net/blog/p1614-encryptedlocalstore-slow/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Weecast Player</title>
		<link>http://toki-woki.net/blog/p1560-weecast-player</link>
		<comments>http://toki-woki.net/blog/p1560-weecast-player#comments</comments>
		<pubDate>Sat, 23 Jan 2010 14:20:04 +0000</pubDate>
		<dc:creator>Quentin T</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[air]]></category>
		<category><![CDATA[as]]></category>
		<category><![CDATA[blue]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[mxml]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://toki-woki.net/blog/?p=1560</guid>
		<description><![CDATA[During the last couple of months I've been working on a free AIR app for a French community-based site called Weecast. Its purpose is to allow users to submit and/or buy screencasts about your favorite apps and languages (mostly Adobe's and Microsoft's, but also 3D ones', OS's and more). Introducing the Weecast Player! The app [...]]]></description>
			<content:encoded><![CDATA[<p>During the last couple of months I've been working on a free AIR app for a French community-based site called <a href="http://www.weecast.fr/">Weecast</a>. Its purpose is to allow users to submit and/or buy screencasts about your favorite apps and languages (mostly Adobe's and Microsoft's, but also 3D ones', OS's and more).</p>
<p>Introducing the <a href="http://www.weecast.fr/player-video">Weecast Player</a>!</p>
<p><a class="img" href="http://www.weecast.fr/player-video"><img class="aligncenter size-full wp-image-1585" title="Weecast Player" src="http://toki-woki.net/blog/wp-content/uploads/2010/01/weecast-official.png" alt="" width="559" height="381" /></a>The app allows you to browse your videos, watch them (4 view modes), search for more, drop comments and stars... I think that's called an RIA, right? There's also an offline mode, so you can access all your stuff anytime.<span id="more-1560"></span></p>
<p>All of this is made in Flex+AIR. The visual identity was made by Weecast ; thanks for the PNGs, folks!</p>
<p>By the way, some parts of it are actually <a href="http://code.google.com/u/quentin.t/">OpenSource</a>, including:</p>
<ul>
<li>Miscellaneous <a href="http://code.google.com/p/adobe-air-util/">AIR utilities</a></li>
<li>The infamous <a href="http://code.google.com/p/as3-bits/source/browse/trunk/FlexGradientText/src/net/tw/flex/controls/GradientLabel.as">GradientLabel</a> (for Flex)</li>
<li><a href="http://code.google.com/p/as3-bits/source/browse/trunk/DynClass/src/net/tw/util/Dynam.as">Dynam.ize</a> and <a href="http://code.google.com/p/as3-bits/source/browse/trunk/BaseObject/src/net/tw/util/air/BaseObject.as">BaseObject</a>, for working with synchronous SQLite databases</li>
</ul>
<p>If you don't know Weecast yet I highly recommend you go visit <a href="http://www.weecast.fr/">their site</a>, grab <a href="http://www.weecast.fr/inscription">an account</a> and the <a href="http://www.weecast.fr/player-video">player</a>, enjoy <a href="http://www.weecast.fr/tuto-gratuit.htm">free videos</a>, and then buy some! Now if you don't understand French... Well, learn it!</p>

<p><small>Post color: <span style='padding-left:2px; padding-right:2px; background-color:#1f212a; color:#d3d5de'>#1f212a &#x25a0;</span></small></p>]]></content:encoded>
			<wfw:commentRss>http://toki-woki.net/blog/p1560-weecast-player/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Meebo Cleaner</title>
		<link>http://toki-woki.net/blog/p1479-meebo-cleaner</link>
		<comments>http://toki-woki.net/blog/p1479-meebo-cleaner#comments</comments>
		<pubDate>Tue, 15 Dec 2009 13:51:28 +0000</pubDate>
		<dc:creator>Quentin T</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[meebo]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[white]]></category>

		<guid isPermaLink="false">http://toki-woki.net/blog/?p=1479</guid>
		<description><![CDATA[Using Google Chrome? Using Meebo? Annoyed by the ad at the bottom and the blog window when you log in? I just wrote and published my first Chrome Extension - Meebo Cleaner, to clean that up! Pretty simple code, nothing revolutionary here. Go get it and let me know what you think, or if you [...]]]></description>
			<content:encoded><![CDATA[<p>Using <a href="http://www.google.com/chrome">Google Chrome</a>? Using <a href="http://www.meebo.com/">Meebo</a>? Annoyed by the ad at the bottom and the blog window when you log in?</p>
<p>I just wrote and published my first Chrome Extension - <a href="https://chrome.google.com/extensions/detail/kmcmomgbhgjfflaoanonjkcccnlmeham">Meebo Cleaner</a>, to clean that up!</p>
<p>Pretty simple code, nothing revolutionary here. Go get it and let me know what you think, or if you have suggestions/ideas...</p>

<p><small>Post color: <span style='padding-left:2px; padding-right:2px; background-color:#ffffff; color:#4b4b4b'>#ffffff &#x25a0;</span></small></p>]]></content:encoded>
			<wfw:commentRss>http://toki-woki.net/blog/p1479-meebo-cleaner/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Paper</title>
		<link>http://toki-woki.net/blog/p1375-paper</link>
		<comments>http://toki-woki.net/blog/p1375-paper#comments</comments>
		<pubDate>Sat, 28 Nov 2009 16:59:26 +0000</pubDate>
		<dc:creator>Quentin T</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[Visual]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mootools]]></category>
		<category><![CDATA[swfaddress]]></category>
		<category><![CDATA[white]]></category>

		<guid isPermaLink="false">http://toki-woki.net/blog/?p=1375</guid>
		<description><![CDATA[Introducing my latest project: TW Paper, a simple iPhone/iPod touch wallpaper gallery+collection. A little bit of JavaScript and some Photoshop/CSS trickery to present a growing collection of images designed for your favorite piece of technology! The page also works on iPhone/iPod touch but looks a little different for better usability. Just tap+hold on the image [...]]]></description>
			<content:encoded><![CDATA[<p>Introducing my latest project: <a href="http://toki-woki.net/p/paper/">TW Paper</a>, a simple iPhone/iPod touch wallpaper gallery+collection.</p>
<p style="text-align: center;"><a class="img" href="http://toki-woki.net/p/paper/"><img title="Paper" src="http://toki-woki.net/blog/wp-content/uploads/2009/11/paper-blog-post.jpg" alt="paper-blog-post" width="482" height="782" /></a><span id="more-1375"></span></p>
<p>A little bit of JavaScript and some Photoshop/CSS trickery to present a growing collection of images designed for your favorite piece of technology!</p>
<p>The page also works on iPhone/iPod touch but looks a little different for better usability. Just tap+hold on the image to save it.</p>
<p style="text-align: center; background-color:#101a27;padding:20px"><img class="aligncenter" title="iPhone screenshot" src="http://toki-woki.net/blog/wp-content/uploads/2009/11/iphone-screenshot.jpg" alt="Paper on iPhone" width="320" height="480" /></p>
<p>Expect the gallery to evolve, with new images and <a href="http://toki-woki.net/kwot/">quotes</a>!</p>

<p><small>Post color: <span style='padding-left:2px; padding-right:2px; background-color:#ffffff; color:#4b4b4b'>#ffffff &#x25a0;</span></small></p>]]></content:encoded>
			<wfw:commentRss>http://toki-woki.net/blog/p1375-paper/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scroll Clock</title>
		<link>http://toki-woki.net/blog/p1351-scroll-clock</link>
		<comments>http://toki-woki.net/blog/p1351-scroll-clock#comments</comments>
		<pubDate>Wed, 18 Nov 2009 15:32:34 +0000</pubDate>
		<dc:creator>Quentin T</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[Visual]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mootools]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[white]]></category>

		<guid isPermaLink="false">http://toki-woki.net/blog/?p=1351</guid>
		<description><![CDATA[I played with MooTools a bit and did that. Useless, opensource, nerdy. I also set up a gallery, so if you've got nice scrollbars that aren't here yet, send' em right away! Post color: #ffffff &#x25a0;]]></description>
			<content:encoded><![CDATA[<p>I played with MooTools a bit and <a href="http://toki-woki.net/p/scroll-clock/">did that</a>. Useless, <a href="http://toki-woki.net/p/scroll-clock/script.js">opensource</a>, nerdy.</p>
<p style="text-align: center;"><a class="img" href="http://toki-woki.net/p/scroll-clock/"><img class="aligncenter" title="Scroll Clock" src="http://toki-woki.net/blog/wp-content/uploads/2009/11/scroll-clock.gif" alt="Scroll Clock" width="365" height="336" /></a></p>
<p>I also set up <a href="http://toki-woki.net/p/scroll-clock/gallery/">a gallery</a>, so if you've got nice scrollbars that aren't here yet, send' em right away!</p>

<p><small>Post color: <span style='padding-left:2px; padding-right:2px; background-color:#ffffff; color:#4b4b4b'>#ffffff &#x25a0;</span></small></p>]]></content:encoded>
			<wfw:commentRss>http://toki-woki.net/blog/p1351-scroll-clock/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>BaseObject</title>
		<link>http://toki-woki.net/blog/p1313-baseobject</link>
		<comments>http://toki-woki.net/blog/p1313-baseobject#comments</comments>
		<pubDate>Fri, 06 Nov 2009 14:12:13 +0000</pubDate>
		<dc:creator>Quentin T</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[air]]></category>
		<category><![CDATA[blue]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[sqlite]]></category>

		<guid isPermaLink="false">http://toki-woki.net/blog/?p=1313</guid>
		<description><![CDATA[I was talking about it, here it is! This class will come in handy every time you work with synchronous SQLite databases in an AIR project. It's a real-world implementation of the Dynam.ize utility I presented earlier... I will show you an example of how to work with it, with simple sub-classes. Let's go! First [...]]]></description>
			<content:encoded><![CDATA[<p>I was talking about it, here it is!</p>
<p>This class will come in handy every time you work with synchronous SQLite databases in an AIR project. It's a real-world implementation of the Dynam.ize utility I presented earlier... I will show you an example of how to work with it, with simple sub-classes. Let's go!<span id="more-1313"></span></p>
<h3>First things first.</h3>
<p>I need to open my database and provide that connection to BaseObect:</p>
<pre class="actionscript"><span style="color: #000000; font-weight: bold;">var</span> sqlCon:SQLConnection=<span style="color: #000000; font-weight: bold;">new</span> SQLConnection<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
sqlCon.<span style="color: #006600;">open</span><span style="color: #66cc66;">&#40;</span>File.<span style="color: #006600;">applicationDirectory</span>.<span style="color: #006600;">resolvePath</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'data.sqlite'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
BaseObject.<span style="color: #006600;">defaultConnection</span>=sqlCon;</pre>
<h3>We need clients!</h3>
<p>Now, let's consider a database with a "client" table (pretty creative, right?), those clients have a name, a URL and a gender (male/female), and of course, an ID. So we have a "client" table with 4 fields: id, name, url, male (which is a Boolean: true=male, false=female).</p>
<p>I have mapped a BaseObject sub-class to this table (I will show you how in a few moments), so I can now create a new client in a pretty simple fashion:</p>
<pre class="actionscript"><span style="color: #000000; font-weight: bold;">var</span> myClient:Client=Client.<span style="color: #006600;">create</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#123;</span><span style="color: #0066CC;">name</span>:<span style="color: #ff0000;">'Joe'</span>, <span style="color: #0066CC;">url</span>:<span style="color: #ff0000;">'http://www.yep.com'</span>, male:<span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;</pre>
<p>Cool, I now have a Client instance I can work with and a line has been added in my "client" table. What if I wanted to change its name? Easy.</p>
<pre class="actionscript">myClient.<span style="color: #006600;">setName</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'Mark'</span><span style="color: #66cc66;">&#41;</span>;</pre>
<p>The "name" field has been updated. Let's check that.</p>
<pre class="actionscript"><span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>myClient.<span style="color: #006600;">getName</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</pre>
<p>Traces "Mark"? Good. OK, what about updating the URL and name at the same time? Two queries? Nope!</p>
<pre class="actionscript">myClient.<span style="color: #006600;">update</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#123;</span><span style="color: #0066CC;">name</span>:<span style="color: #ff0000;">'Jack'</span>, <span style="color: #0066CC;">url</span>:<span style="color: #ff0000;">'http://www.yo.net'</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;</pre>
<p>Now let's grab a client via his ID.</p>
<pre class="actionscript"><span style="color: #000000; font-weight: bold;">var</span> c1:Client=Client.<span style="color: #006600;">getFromID</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;</pre>
<p>Simple. But what if I wanted to grab more than one client, fox example what if I wanted all male clients?</p>
<pre class="actionscript"><span style="color: #000000; font-weight: bold;">var</span> males:<span style="color: #0066CC;">Array</span>=Client.<span style="color: #006600;">getFromQuery</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'SELECT * FROM client WHERE male=@male'</span>, <span style="color: #66cc66;">&#123;</span><span style="color: #ff0000;">'@male'</span>:<span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;</pre>
<p>You can now loop through this array and interact with the Client instances it contains...</p>
<h3>What's the trick?</h3>
<p>Nothing too hard to understand. Client is a sub-class of BaseObject that simply exposes some of its static and instance methods (getFromID, getFromQuery, create, update and so on). It also casts BaseObject return values to the right type: Client. For example, this is how getFromID works:</p>
<pre class="actionscript"><span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> getFromID<span style="color: #66cc66;">&#40;</span>id:uint<span style="color: #66cc66;">&#41;</span>:Client <span style="color: #66cc66;">&#123;</span>
	<span style="color: #b1b100;">return</span> BaseObject._getFromID<span style="color: #66cc66;">&#40;</span>getTableData<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>, id<span style="color: #66cc66;">&#41;</span> as Client;
<span style="color: #66cc66;">&#125;</span></pre>
<p>Now you might wonder what this getTableData method is. Well it returns data about the table to which Client is bound to, like that:</p>
<pre class="actionscript"><span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> getTableData<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:TableData <span style="color: #66cc66;">&#123;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>!_tableData<span style="color: #66cc66;">&#41;</span> _tableData=<span style="color: #000000; font-weight: bold;">new</span> TableData<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'client'</span>, Client, <span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'name'</span>, <span style="color: #ff0000;">'url'</span>, <span style="color: #ff0000;">'male'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #b1b100;">return</span> _tableData;
<span style="color: #66cc66;">&#125;</span></pre>
<p>See? We define the table name (client), the current class (Client) and the fields we need to handle (name, url and male)... That's it.</p>
<h3>Our clients bought cars...</h3>
<p>That's right, so we should have a "car" table, right? With id, name, brand, clientID and purchaseDate we should be good. Its TableData would look like that:</p>
<pre class="actionscript"> <span style="color: #000000; font-weight: bold;">new</span> TableData<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'car'</span>, Car, <span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'name'</span>, <span style="color: #ff0000;">'brand'</span>, <span style="color: #ff0000;">'clientID'</span>, <span style="color: #ff0000;">'purchaseDate'</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;</pre>
<p>Note: I didn't list id as BaseObject supposes there's always an id field.</p>
<p>OK, so our clients bought cars, and we'd like to know who bought what. Let's write a method in Client to do that:</p>
<pre class="actionscript"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> getCars<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Array</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #b1b100;">return</span> Car.<span style="color: #006600;">getFromQuery</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'SELECT * FROM car WHERE clientID=@id'</span>, <span style="color: #66cc66;">&#123;</span><span style="color: #ff0000;">'@id'</span>:id<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre>
<p>That works, cool. But we can do better, we could cache this Array so we don't query every time we need it ; there's a technique for that:</p>
<pre class="actionscript"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> getCars<span style="color: #66cc66;">&#40;</span>force:<span style="color: #0066CC;">Boolean</span>=<span style="color: #000000; font-weight: bold;">false</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">Array</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #66cc66;">&#40;</span>hasCache<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'cars'</span><span style="color: #66cc66;">&#41;</span> &amp;amp;&amp;amp; !force<span style="color: #66cc66;">&#41;</span> ?
		getCache<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'cars'</span><span style="color: #66cc66;">&#41;</span> :
		setCache<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'cars'</span>, Car.<span style="color: #006600;">getFromQuery</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'SELECT * FROM car WHERE clientID=@id'</span>, <span style="color: #66cc66;">&#123;</span><span style="color: #ff0000;">'@id'</span>:id<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre>
<p>Done. Optimized.</p>
<p>We can now see which cars our first client bought:</p>
<pre class="actionscript"><span style="color: #000000; font-weight: bold;">var</span> c1cars:<span style="color: #0066CC;">Array</span>=c1.<span style="color: #006600;">getCars</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</pre>
<p>We could also implement the opposite: retrieving a Client form a Car instance:</p>
<pre class="actionscript"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> getClient<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:Client <span style="color: #66cc66;">&#123;</span>
	<span style="color: #b1b100;">return</span> Client.<span style="color: #006600;">getFromID</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>.<span style="color: #006600;">getClientID</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre>
<p>Notice how I used getClientID? This refers to the table's clientID field and returns it.</p>
<h3>That's a wrap.</h3>
<p>Well that's pretty much it, I think I covered the basics!</p>
<p>If you want to play with it, get the <a href="https://code.google.com/p/as3-bits/source/browse/trunk/bits/src/net/tw/util/air/BaseObject.as">class</a>/<a href="https://code.google.com/p/as3-bits/source/browse/trunk/examples/BaseObject">demo project</a> and tell me what you think. I've bundled Client, Car and some example uses...</p>

<p><small>Post color: <span style='padding-left:2px; padding-right:2px; background-color:#bcdeff; color:#082a4b'>#bcdeff &#x25a0;</span></small></p>]]></content:encoded>
			<wfw:commentRss>http://toki-woki.net/blog/p1313-baseobject/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dynam.ize</title>
		<link>http://toki-woki.net/blog/p1298-dynam-ize</link>
		<comments>http://toki-woki.net/blog/p1298-dynam-ize#comments</comments>
		<pubDate>Wed, 04 Nov 2009 12:23:39 +0000</pubDate>
		<dc:creator>Quentin T</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[dynamic]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[orange]]></category>

		<guid isPermaLink="false">http://toki-woki.net/blog/?p=1298</guid>
		<description><![CDATA[Still while working on this app I was talking about earlier I realized I was quite used to working with PHP classes' Magic Methods, and more precisely the way it handles overloading. Those lovely __get, __set and __call methods are called whenever you try to access a property/method that is not explicitly defined, making your class dynamic. Of [...]]]></description>
			<content:encoded><![CDATA[<p>Still while working on this app I was talking about earlier I realized I was quite used to working with PHP classes' <a href="http://www.php.net/manual/language.oop5.magic.php">Magic Methods</a>, and more precisely the way it handles <a href="http://www.php.net/manual/language.oop5.overloading.php">overloading</a>. Those lovely <em>__get</em>, <em>__set</em> and <em>__call</em> methods are called whenever you try to access a property/method that is not explicitly defined, making your class dynamic. Of course you don't need this all the time, and it might even be dangerous, but it some cases that's simply perfect.</p>
<p>You can do that with AS3 if you extend <a href="http://livedocs.adobe.com/flex/3/langref/flash/utils/Proxy.html">flash.utils.Proxy</a>, cool. But wait, no! Not cool! What if I wanted to extend something else? Nah, let's find something else...<span id="more-1298"></span></p>
<p>I came up with the idea of dynamically creating getter and setter functions on a class instance for predefined properties. Now those aren't <strong>really </strong>getters and setters but let me show you what it looks like so you understand better... Here's an example:</p>
<pre class="actionscript">package <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> net.<span style="color: #006600;">tw</span>.<span style="color: #006600;">util</span>.<span style="color: #006600;">Dynam</span>;
	<span style="color: #808080; font-style: italic;">// This is my class, that has to be dynamic</span>
	<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">dynamic</span> <span style="color: #000000; font-weight: bold;">class</span> DynClass <span style="color: #66cc66;">&#123;</span>
		<span style="color: #808080; font-style: italic;">// This Array will be used to store the properties' values...</span>
		protected <span style="color: #000000; font-weight: bold;">var</span> _data:<span style="color: #0066CC;">Array</span>=<span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span>;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> DynClass<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #808080; font-style: italic;">// In the constructor I call the Dynam.ize method on this, so it builds the getters and setters for the supplied properties</span>
			Dynam.<span style="color: #006600;">ize</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>, <span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">'abc'</span>, <span style="color: #ff0000;">'def'</span>, <span style="color: #ff0000;">'ghi'</span><span style="color: #66cc66;">&#93;</span>, getter, setter<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
		<span style="color: #808080; font-style: italic;">// Here are the functions that will be called when I try to get or set one of the properties I listed in Dynam.ize</span>
		protected <span style="color: #000000; font-weight: bold;">function</span> getter<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">key</span>:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:* <span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">return</span> _data<span style="color: #66cc66;">&#91;</span><span style="color: #0066CC;">key</span><span style="color: #66cc66;">&#93;</span>;
		<span style="color: #66cc66;">&#125;</span>
		protected <span style="color: #000000; font-weight: bold;">function</span> setter<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">key</span>:<span style="color: #0066CC;">String</span>, v:*<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			_data<span style="color: #66cc66;">&#91;</span><span style="color: #0066CC;">key</span><span style="color: #66cc66;">&#93;</span>=v;
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre>
<p>Now let's instantiate this class and play with it:</p>
<pre class="actionscript"><span style="color: #000000; font-weight: bold;">var</span> dc:DynClass=<span style="color: #000000; font-weight: bold;">new</span> DynClass<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</pre>
<p>We can call getAbc() or setAbc() on it:</p>
<pre class="actionscript">dc.<span style="color: #006600;">setAbc</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'my value'</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'get abc'</span>, dc.<span style="color: #006600;">getAbc</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</pre>
<p>Everything should be OK. It would work the same with get/setDef and get/setGhi... This example might not seem very useful but you could do anything within the getters and setters ; for example access SharedObjects, sending data to a server and so on...</p>
<p>Find <a href="https://code.google.com/p/as3-bits/source/browse/trunk/bits/src/net/tw/util/Dynam.as">the class</a> and a demo project on <a href="https://code.google.com/p/as3-bits/source/browse/trunk/examples/DynClass/src">as3-bits</a>!</p>
<p>Coming up next: my implementation of this concept for AIR's SQLite databases!</p>
<p>Thoughts?</p>

<p><small>Post color: <span style='padding-left:2px; padding-right:2px; background-color:#ffdb90; color:#4b2700'>#ffdb90 &#x25a0;</span></small></p>]]></content:encoded>
			<wfw:commentRss>http://toki-woki.net/blog/p1298-dynam-ize/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex &#8211; GradientLabel</title>
		<link>http://toki-woki.net/blog/p1261-flex-gradient-label</link>
		<comments>http://toki-woki.net/blog/p1261-flex-gradient-label#comments</comments>
		<pubDate>Mon, 02 Nov 2009 12:00:06 +0000</pubDate>
		<dc:creator>Quentin T</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[blue]]></category>
		<category><![CDATA[component]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[font]]></category>
		<category><![CDATA[mxml]]></category>
		<category><![CDATA[opensource]]></category>

		<guid isPermaLink="false">http://toki-woki.net/blog/?p=1261</guid>
		<description><![CDATA[If you've ever wondered whether it's possible to apply a gradient on a Flex Label, well it is ; but that's not very straight forward... As I'm working on a app that requires this kind of glitter I decided to try and see what could be done. I started with a basic ActionScript project (no Flex involved) [...]]]></description>
			<content:encoded><![CDATA[<p>If you've ever wondered whether it's possible to apply a gradient on a Flex Label, well it is ; but that's not very straight forward... As I'm working on a app that requires this kind of glitter I decided to try and see what could be done.</p>
<p>I started with a basic ActionScript project (no Flex involved) and <a href="https://code.google.com/p/as3-bits/source/browse/trunk/bits/src/net/tw/text/GradientText.as">came up with this</a>. Quite functional, could probably be optimized but my goal was actually a Flex component and I knew that was technically feasible. I then simply extended Flex's Label class and basically copied/pasted the logic into it. Just had to figure out which event to listen to and I was good to go...</p>
<p>Here's a demo app for your playing pleasure.</p>
<object width="560" height="240">
	<param name="movie" value="http://as3-bits.googlecode.com/svn/trunk/examples/FlexGradientText/bin-release/FlexGradientText.swf"></param>
	<embed src="http://as3-bits.googlecode.com/svn/trunk/examples/FlexGradientText/bin-release/FlexGradientText.swf" type="application/x-shockwave-flash" width="560" height="240"></embed>
</object>
<noembed>[http://as3-bits.googlecode.com/svn/trunk/examples/FlexGradientText/bin-release/FlexGradientText.swf]</noembed>
<p><small>You may notice that in this example I embed the font so it looks nicer, but this is not mandatory...</small></p>
<p>All this is opensource (<a href="https://code.google.com/p/as3-bits/source/browse/trunk/bits/src/net/tw/flex/mx/controls/GradientLabel.as">class</a>+<a href="https://code.google.com/p/as3-bits/source/browse/trunk/examples/FlexGradientText">project</a>) and you can grab it at my brand new Google Code dump: <a href="http://code.google.com/p/as3-bits/">as3-bits</a>. Help yourself.</p>
<p>As always, feedback welcome.</p>

<p><small>Post color: <span style='padding-left:2px; padding-right:2px; background-color:#343545; color:#e8e9f9'>#343545 &#x25a0;</span></small></p>]]></content:encoded>
			<wfw:commentRss>http://toki-woki.net/blog/p1261-flex-gradient-label/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash+iPhone!</title>
		<link>http://toki-woki.net/blog/p1229-flash-iphone</link>
		<comments>http://toki-woki.net/blog/p1229-flash-iphone#comments</comments>
		<pubDate>Mon, 05 Oct 2009 19:06:49 +0000</pubDate>
		<dc:creator>Quentin T</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[red]]></category>

		<guid isPermaLink="false">http://toki-woki.net/blog/?p=1229</guid>
		<description><![CDATA[Quick news, good news. Developing for the Apple iPhone using Flash is now possible, hell! Read more here and there. Expect me to build stuff with it! Post color: #661010 &#x25a0;]]></description>
			<content:encoded><![CDATA[<p>Quick news, good news. <a href="http://www.adobe.com/devnet/logged_in/abansod_iphone.html">Developing for the Apple iPhone using Flash</a> is now possible, hell! Read more <a href="http://labs.adobe.com/wiki/index.php/Applications_for_iPhone:Developer_FAQ">here</a> and <a href="http://labs.adobe.com/technologies/flashcs5/appsfor_iphone/">there</a>.</p>
<p>Expect me to build stuff with it!</p>

<p><small>Post color: <span style='padding-left:2px; padding-right:2px; background-color:#661010; color:#ffc4c4'>#661010 &#x25a0;</span></small></p>]]></content:encoded>
			<wfw:commentRss>http://toki-woki.net/blog/p1229-flash-iphone/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ébruiter²</title>
		<link>http://toki-woki.net/blog/p1212-ebruiter-2</link>
		<comments>http://toki-woki.net/blog/p1212-ebruiter-2#comments</comments>
		<pubDate>Mon, 05 Oct 2009 18:12:35 +0000</pubDate>
		<dc:creator>Quentin T</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[boks]]></category>
		<category><![CDATA[fr]]></category>
		<category><![CDATA[grid]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[ui]]></category>
		<category><![CDATA[white]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://toki-woki.net/blog/?p=1212</guid>
		<description><![CDATA[Hop, je viens de payer des nouveaux habits à Ébruiter (le blog qui parle de musique à ceux qui ont des oreilles) qui ne se plaisait plus dans son premier ensemble... Grid system, bien sûr. Toujours WordPress, avec un thème maison (merci Boks et Greg) et des hacks par-ci par-là. Et puisque finalement j'aime bien le [...]]]></description>
			<content:encoded><![CDATA[<p>Hop, je viens de payer des nouveaux habits à <a href="http://toki-woki.net/ebruiter/">Ébruiter</a> (le blog qui parle de musique à ceux qui ont des oreilles) qui ne se plaisait plus dans son <a href="http://toki-woki.net/blog/p218-ebruiter">premier ensemble</a>... Grid system, bien sûr. Toujours WordPress, avec un thème maison (merci <a href="http://toki-woki.net/p/Boks/">Boks</a> et Greg) et des hacks par-ci par-là.</p>
<p><a class="img" href="http://toki-woki.net/ebruiter/"><img class="aligncenter size-full wp-image-1220" title="Ebruiter²" src="http://toki-woki.net/blog/wp-content/uploads/2009/10/ebruiter2.jpg" alt="Ebruiter²" width="534" height="53" /></a></p>
<p>Et puisque finalement j'aime bien le concept, je vais essayer de reprendre l'habitude de poster des trucs. Ça va être super.</p>
<p>Chope <a href="http://toki-woki.net/ebruiter/feed">le flux</a>, poto !</p>

<p><small>Post color: <span style='padding-left:2px; padding-right:2px; background-color:#ffffff; color:#4b4b4b'>#ffffff &#x25a0;</span></small></p>]]></content:encoded>
			<wfw:commentRss>http://toki-woki.net/blog/p1212-ebruiter-2/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FileWatch</title>
		<link>http://toki-woki.net/blog/p1156-filewatch</link>
		<comments>http://toki-woki.net/blog/p1156-filewatch#comments</comments>
		<pubDate>Thu, 01 Oct 2009 13:20:39 +0000</pubDate>
		<dc:creator>Quentin T</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[air]]></category>
		<category><![CDATA[gray]]></category>
		<category><![CDATA[illustrator]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[ui]]></category>

		<guid isPermaLink="false">http://toki-woki.net/blog/?p=1156</guid>
		<description><![CDATA[I wanted to try Flex 4 with a "real life" project so I wrote this little thing. Rough draft. The app will allow you to monitor files changes: select a text file and you'll be prompted when it's updated. Basic. By the way, did I say "rough draft" before? Everything in it is OpenSource, from [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to try Flex 4 with a "real life" project so I wrote this little thing. Rough draft.</p>
<p><img class="aligncenter size-full wp-image-1157" title="FileWatch" src="http://toki-woki.net/blog/wp-content/uploads/2009/09/fw-ss.jpg" alt="FileWatch" width="560" height="304" /></p>
<p>The app will allow you to monitor files changes: select a text file and you'll be prompted when it's updated. Basic. By the way, did I say "rough draft" before?</p>
<p>Everything in it is OpenSource, from the Illustrator files to the MXML and CSS stuff, so <a href="http://code.google.com/p/air-filewatch/">play with it</a>! For those who only want the .air, <a href="http://air-filewatch.googlecode.com/svn/trunk/FileWatch.air">here it is</a>.<span id="more-1156"></span></p>
<h3>Now, why is it cool?</h3>
<ul>
<li>Build with the brand new Flex 4 (Gumbo) framework</li>
<li>Uses a home-brewed IconButton class, because Gumbo doesn't provide any</li>
<li>Uses the new Spark custom skins logic (on Button, ScrollBar and more...)</li>
<li>Uses the new states' logic and transitions</li>
<li>Based on <a href="http://code.google.com/p/as3corelib/">as3corelib</a>'s FileMonitor class</li>
<li>Shows you how to build a multi-instance AIR app</li>
<li>Contains Illustrator/Photoshop UI files</li>
</ul>
<h3>And why is it not that cool?</h3>
<ul>
<li>Probably still buggy, wait for updates!</li>
<li>Flex 4 is not done yet, so the code might break at any time</li>
<li>No icons yet</li>
<li>No or very few comments</li>
<li>Pretty useless app!</li>
</ul>
<p>If you're trying to learn Flex/Flex 4 or wondering what's new in it and how to use it you should definitively give it a go...</p>
<p>Have questions? Drop'em!</p>

<p><small>Post color: <span style='padding-left:2px; padding-right:2px; background-color:#5c5c5c; color:#ffffff'>#5c5c5c &#x25a0;</span></small></p>]]></content:encoded>
			<wfw:commentRss>http://toki-woki.net/blog/p1156-filewatch/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Snips2</title>
		<link>http://toki-woki.net/blog/p1073-snips-2</link>
		<comments>http://toki-woki.net/blog/p1073-snips-2#comments</comments>
		<pubDate>Sun, 06 Sep 2009 17:38:01 +0000</pubDate>
		<dc:creator>Quentin T</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[by]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[purple]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://toki-woki.net/blog/?p=1073</guid>
		<description><![CDATA[Remember my first and only WordPress plugin? Well it just got better. Snips 2.0 is basically Snips rewritten from scratch, updated to fit WordPress' Shortcode API. Let's see how good it is... Tired of having to copy paste nasty HTML code from sites such as YouTube, Vimeo and so on? Looking for a way to [...]]]></description>
			<content:encoded><![CDATA[<p>Remember my first and only WordPress plugin? Well it just got better.</p>
<p style="text-align: center;"><a class="img" href="http://wordpress.org/extend/plugins/snips/"><img class="size-full wp-image-1076 aligncenter" title="Snips2" src="http://toki-woki.net/blog/wp-content/uploads/2009/09/snips2.jpg" alt="Snips2" width="560" height="225" /></a></p>
<p>Snips 2.0 is basically <a href="http://toki-woki.net/blog/p67-snips-wordpress-snippet-plugin">Snips</a> rewritten from scratch, updated to fit WordPress' <a href="http://codex.wordpress.org/Shortcode_API">Shortcode API</a>. Let's see how good it is...<span id="more-1073"></span></p>
<p>Tired of having to copy paste nasty HTML code from sites such as YouTube, Vimeo and so on? Looking for a way to insert recurrent content in your posts without having to type it every time? Would like to be able to inject parameters in these snippets? Well, now you can.</p>
<p>Just install Snips and use the bundled shortcodes or create/edit your own!</p>
<p>Each Snip is a combination of a <strong>name</strong>, a <strong>model </strong>and optional <strong>parameters</strong>. The name defines the shortcode tag you will be able to use, the model is the content that will replace your shortcode calls and the parameters (that look like #the-parameter# in the model) are portions of the model that can change from a call to an other. Those parameters can have default values or can be left empty and then become mandatory.</p>
<p>All of this can be edited via a simple UI, found under Settings &gt; Snips... Here's screenshot:</p>
<p style="text-align: center;"><img class="size-full wp-image-1078 aligncenter" title="Snips2 screenshot" src="http://toki-woki.net/blog/wp-content/uploads/2009/09/snips2-screenshot.jpg" alt="Snips2 screenshot" width="560" height="394" /></p>
<p><strong>For those that used Snips' first version:</strong> (0.2) everything should be OK, the previous syntax will work ; but I recommend using the new one and the corresponding updated model files (ex: yt becomes yt2). Also, the #up# parameter (used in <strong>mp3 </strong>and <strong>swf</strong> snips) has to be set manually to your blog's upload path.</p>
<p>If you use it and find bugs, please let me know! This is the first time I use jQuery behavior (for the parameters' detection in the Settings page) so it could act a little weird.</p>

<p><small>Post color: <span style='padding-left:2px; padding-right:2px; background-color:#542D70; color:#ffe1ff'>#542D70 &#x25a0;</span></small></p>]]></content:encoded>
			<wfw:commentRss>http://toki-woki.net/blog/p1073-snips-2/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>TWPlaylist</title>
		<link>http://toki-woki.net/blog/p1035-twplaylist</link>
		<comments>http://toki-woki.net/blog/p1035-twplaylist#comments</comments>
		<pubDate>Sat, 29 Aug 2009 15:44:52 +0000</pubDate>
		<dc:creator>Quentin T</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[gray]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[mootools]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://toki-woki.net/blog/?p=1035</guid>
		<description><![CDATA[I wanted to do this for quite some time: a place that logs tracks I listen to. Introducing TWPlaylist! Thanks to Twitter and a Winamp Plugin, all tracks that I listen to (at work) are stored on a dummy account (if you know a plugin that does the same for iTunes, please let me know). [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to do this for quite some time: a place that logs tracks I listen to.</p>
<p style="text-align: center;"><a class="img" href="http://toki-woki.net/p/TWPlaylist/"><img class="aligncenter" title="TWPlaylist" src="http://toki-woki.net/blog/wp-content/uploads/2009/08/twplaylist.gif" alt="TWPlaylist" width="560" height="156" /></a></p>
<p>Introducing <a href="http://toki-woki.net/p/TWPlaylist/">TWPlaylist</a>! Thanks to Twitter and a <a href="http://www.winamp.com/plugins/details/221831">Winamp Plugin</a>, all tracks that I listen to (at work) are stored on <a href="http://twitter.com/twplaylist">a dummy account</a> (if you know a plugin that does the same for iTunes, please let me know). And to keep things nice and smooth, I set up <a href="http://toki-woki.net/p/TWPlaylist/">a quick page</a> that pulls this data and displays it thanks to some AJAX magic... Tracks link to a <a href="http://www.discogs.com/">Discogs</a> search page to find more about them.</p>
<p><span id="more-1035"></span>As you can read the project page's bottom, everything I wrote is opensource. HTML, <a href="http://toki-woki.net/p/playlist/style.css">CSS</a> and <a href="http://toki-woki.net/p/playlist/playlist.js">JS</a> ; help yourself. Nothing too fancy, but it could prevent you from wasting time... By the way, the code should be self-explanatory, but if it's not I can help.</p>
<p>You will probably notice the some tracks' data look weird, in fact the Winamp plugin chokes on special characters such as "&amp;" and accented letters... I hope this gets fixed one day.</p>
<p>I've never been a big fan of Twitter as I think most user don't use it the way it should be used, for example by having private discussions or retweeting too much. However it's a pretty interesting platform for experimentation and art projects. What do you think?</p>

<p><small>Post color: <span style='padding-left:2px; padding-right:2px; background-color:#666666; color:#ffffff'>#666666 &#x25a0;</span></small></p>]]></content:encoded>
			<wfw:commentRss>http://toki-woki.net/blog/p1035-twplaylist/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
