<?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/"
	>

<channel>
	<title>ScribbleScrabble</title>
	<atom:link href="http://scribble.kai-studios.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://scribble.kai-studios.com</link>
	<description>A Scripting Journal</description>
	<pubDate>Mon, 06 Apr 2009 16:07:40 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>I&#8217;m back</title>
		<link>http://scribble.kai-studios.com/2009/03/29/im-back/</link>
		<comments>http://scribble.kai-studios.com/2009/03/29/im-back/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 04:02:16 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
		
		<category><![CDATA[Life]]></category>

		<category><![CDATA[News]]></category>

		<category><![CDATA[Augmented Reality]]></category>

		<category><![CDATA[fast and furious]]></category>

		<category><![CDATA[tvg]]></category>

		<category><![CDATA[watchmen]]></category>

		<category><![CDATA[x-men]]></category>

		<guid isPermaLink="false">http://scribble.kai-studios.com/?p=120</guid>
		<description><![CDATA[It&#8217;s been a long time since I&#8217;ve updated this blog due to the busy working life over the month. We&#8217;ve been flooded by projects coming in at TVG, which is definitely a good news at current economy. Over the month, I&#8217;ve worked and launched Fast &#38; Furious, Watchmen Motion Comic, and Watchmen Black Freighter websites. [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a long time since I&#8217;ve updated this blog due to the busy working life over the month. We&#8217;ve been flooded by projects coming in at TVG, which is definitely a good news at current economy. Over the month, I&#8217;ve worked and launched <a title="Fast &amp; Furious" href="http://www.fastandfuriousmovie.net/" target="_blank">Fast &amp; Furious</a>, <a title="Watchmen Motion Comic" href="http://watchmenmotioncomic.com/" target="_blank">Watchmen Motion Comic</a>, and <a title="Watchmen Black Freighter" href="http://watchmenblackfreighter.com/" target="_blank">Watchmen Black Freighter </a>websites. I also had the opportunity to go to the <a title="Fast &amp; Furious World Premiere" href="http://www.hollywoodpremieres.com/fastandfurious/widget.html" target="_blank">Fast &amp; Furious World Premiere</a> which was a blast.</p>
<p>Currently, I&#8217;m working on implementing special effects into <a title="X-Men Origins: Wolverine" href="http://x-menorigins.com/" target="_blank">X-Men Origins: Wolverine&#8217;s website</a>, and we&#8217;ve just confirmed an Augmented Reality project which I&#8217;ll be working on and looking forward to bring it up as a buzz in the web when we launch it, I&#8217;ll only have around 2 weeks to work on this.  I&#8217;ll be updating again soon with the few projects that I worked on to give an insight of how things were being built. So look forward to see this blog updating often again <img src='http://scribble.kai-studios.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://scribble.kai-studios.com/2009/03/29/im-back/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Augmented Reality</title>
		<link>http://scribble.kai-studios.com/2009/02/08/augmented-reality/</link>
		<comments>http://scribble.kai-studios.com/2009/02/08/augmented-reality/#comments</comments>
		<pubDate>Sun, 08 Feb 2009 10:51:24 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
		
		<category><![CDATA[Experiment]]></category>

		<category><![CDATA[Flash]]></category>

		<category><![CDATA[Video]]></category>

		<category><![CDATA[Augmented Reality]]></category>

		<category><![CDATA[Ecomagination]]></category>

		<category><![CDATA[FLARToolkit]]></category>

		<category><![CDATA[GE]]></category>

		<category><![CDATA[Papervision3D]]></category>

		<category><![CDATA[Saqoosha]]></category>

		<category><![CDATA[Virtual Reality]]></category>

		<guid isPermaLink="false">http://scribble.kai-studios.com/?p=116</guid>
		<description><![CDATA[
So before Virtual Reality(VR) even reaches its full potential, Augmented Reality(AR) has stepped into play and it&#8217;s definitely going to be the next big thing&#8230;.until it dies down that is. So good news for flash users is that we finally got it in Flash now, all you need is FLARToolkit and some papervision3d knowledge and [...]]]></description>
			<content:encoded><![CDATA[<p><object width="480" height="356" data="http://scribble.kai-studios.com/swf/videos/augmentedreality.swf" type="application/x-shockwave-flash"><param name="src" value="http://scribble.kai-studios.com/swf/videos/augmentedreality.swf" /></object><br />
So before Virtual Reality(VR) even reaches its full potential, Augmented Reality(AR) has stepped into play and it&#8217;s definitely going to be the next big thing&#8230;.until it dies down that is. So good news for flash users is that we finally got it in Flash now, all you need is FLARToolkit and some papervision3d knowledge and you&#8217;re on your way to some cool Augmented Reality.</p>
<p>Above is a simple test that I just built and recorded to show the capability and the camera detection, it&#8217;s looking pretty good and I&#8217;m ready to explore more with it.</p>
<p>If you&#8217;ve never heard about AR before, it&#8217;s time to dig in, GE has recently launched a <a title="Ecomagination" href="http://ge.ecomagination.com/smartgrid/#/augmented_reality" target="_blank">site</a> with it implemented in, I believe it&#8217;s the first Flash site with it, correct me if I&#8217;m wrong. If you have a camera and a printer, you should try it! Print the marker, activate your camera, and get ready for some coolness.</p>
<p>Here&#8217;s another great <a title="Augmented Reality with Flartoolkit" href="http://blog.papervision3d.org/2009/01/07/augmented-reality-with-flartoolkit/">video</a> by Japanese coder <a title="Saqoosha" href="http://saqoosha.net/en/" target="_blank">Saqoosha</a>. If watching it&#8217;s not enough for you, dive in with some <a title="Happy New Year" href="http://09.aid-dcc.com/" target="_self">real action</a>. This is really awesome.</p>
<p>I&#8217;m really excited with all the possibilities this can bring us too, let me know if you have any experiments with it, I would like to see more Flash Augmented Reality experiments.</p>
]]></content:encoded>
			<wfw:commentRss>http://scribble.kai-studios.com/2009/02/08/augmented-reality/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Busy year</title>
		<link>http://scribble.kai-studios.com/2009/02/07/busy-year/</link>
		<comments>http://scribble.kai-studios.com/2009/02/07/busy-year/#comments</comments>
		<pubDate>Sat, 07 Feb 2009 08:36:01 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
		
		<category><![CDATA[Experiment]]></category>

		<category><![CDATA[Flash]]></category>

		<category><![CDATA[Life]]></category>

		<category><![CDATA[Tutorial]]></category>

		<category><![CDATA[gtween]]></category>

		<category><![CDATA[Hybrid Studio]]></category>

		<category><![CDATA[pool]]></category>

		<category><![CDATA[tweenlite]]></category>

		<category><![CDATA[tweenmax]]></category>

		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://scribble.kai-studios.com/?p=110</guid>
		<description><![CDATA[Hey guys, sorry that I haven&#8217;t been updating or writing any tutorials for some time. Life has been busy since I started work at Hybrid. Things are constantly going on in the company, you barely have time to breathe and to be honest, I don&#8217;t feel the impact of the economy crisis working in there. [...]]]></description>
			<content:encoded><![CDATA[<p>Hey guys, sorry that I haven&#8217;t been updating or writing any tutorials for some time. Life has been busy since I started work at Hybrid. Things are constantly going on in the company, you barely have time to breathe and to be honest, I don&#8217;t feel the impact of the economy crisis working in there. So for the past week, I&#8217;ve been finishing work at 8+ and played a little pool with my coworker before heading back, and without having time to do much, it&#8217;s already the end of the day to welcome the new day. From what I see going on in the company, it&#8217;s going to be a good busy year ahead. Anyway I hope to write up something this weekend.</p>
<p>So GTween has released the 5th Beta and it&#8217;s looking really promising. Check the demo out <a title="GTween 5 Demo" href="http://www.gskinner.com/libraries/gtween/#demos" target="_blank">here</a>.</p>
<p>Update: TweenLite/TweenMax has also released <a title="TweenLite/TweenMax" href="http://blog.greensock.com/new/" target="_blank">version 10</a>. I&#8217;m still stuck in between the two in choosing the right one. Leave your opinions</p>
]]></content:encoded>
			<wfw:commentRss>http://scribble.kai-studios.com/2009/02/07/busy-year/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Live to work</title>
		<link>http://scribble.kai-studios.com/2009/01/29/live-to-work/</link>
		<comments>http://scribble.kai-studios.com/2009/01/29/live-to-work/#comments</comments>
		<pubDate>Fri, 30 Jan 2009 07:17:23 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
		
		<category><![CDATA[Life]]></category>

		<category><![CDATA[Friends]]></category>

		<category><![CDATA[talent]]></category>

		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://scribble.kai-studios.com/?p=106</guid>
		<description><![CDATA[Do you work to live or do you live to work? Think about it. It makes a difference.
By the way, I&#8217;ve added friends links on the sidebar, who are people that I currently work with, or people who I worked with in the past. I&#8217;m glad to be able to meet these people and work [...]]]></description>
			<content:encoded><![CDATA[<p>Do you work to live or do you live to work? Think about it. It makes a difference.</p>
<p>By the way, I&#8217;ve added friends links on the sidebar, who are people that I currently work with, or people who I worked with in the past. I&#8217;m glad to be able to meet these people and work with these incredible talents. Nice to know ya&#8217;ll.</p>
]]></content:encoded>
			<wfw:commentRss>http://scribble.kai-studios.com/2009/01/29/live-to-work/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Vectorvision</title>
		<link>http://scribble.kai-studios.com/2009/01/25/vectorvision/</link>
		<comments>http://scribble.kai-studios.com/2009/01/25/vectorvision/#comments</comments>
		<pubDate>Mon, 26 Jan 2009 04:56:33 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
		
		<category><![CDATA[Experiment]]></category>

		<category><![CDATA[Flash]]></category>

		<category><![CDATA[barcinski-jeanjean]]></category>

		<category><![CDATA[papervision]]></category>

		<category><![CDATA[vectorvision]]></category>

		<guid isPermaLink="false">http://scribble.kai-studios.com/?p=101</guid>
		<description><![CDATA[
Vectorvision by Barcinski-Jeanjean has recently be implemented into the official Papervision. Here&#8217;s my first experimentation with it. I was planning to take down my site and replace with just a few words and Vectorvision just appeared at the right time. So I&#8217;ll be able to add an extra depth of interest to something simple that [...]]]></description>
			<content:encoded><![CDATA[<p><object width="480" height="250" data="http://scribble.kai-studios.com/swf/vectorvision.swf" type="application/x-shockwave-flash"><param name="src" value="http://scribble.kai-studios.com/swf/vectorvision.swf" /></object></p>
<p><a title="Vectorvision" href="http://code.google.com/p/vectorvision/" target="_blank">Vectorvision</a> by <a title="Barcinski-Jeanjean" href="http://www.barcinski-jeanjean.com/" target="_blank">Barcinski-Jeanjean</a> has recently be implemented into the official <a title="Papervision" href="http://code.google.com/p/papervision3d/" target="_blank">Papervision</a>. Here&#8217;s my first experimentation with it. I was planning to take down my site and replace with just a few words and Vectorvision just appeared at the right time. So I&#8217;ll be able to add an extra depth of interest to something simple that I have in mind.</p>
<p>I&#8217;m looking to post about papervision sometime soon so I&#8217;ll definitely have a run through on Vectorvision here in the near future. Happy Chinese New Year to those who celebrate it <img src='http://scribble.kai-studios.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://scribble.kai-studios.com/2009/01/25/vectorvision/feed/</wfw:commentRss>
		</item>
		<item>
		<title>GTween Basics</title>
		<link>http://scribble.kai-studios.com/2009/01/17/gtween-basics/</link>
		<comments>http://scribble.kai-studios.com/2009/01/17/gtween-basics/#comments</comments>
		<pubDate>Sun, 18 Jan 2009 05:49:41 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
		
		<category><![CDATA[Flash]]></category>

		<category><![CDATA[Tutorial]]></category>

		<category><![CDATA[actionscript 3]]></category>

		<category><![CDATA[easing]]></category>

		<category><![CDATA[gtween]]></category>

		<guid isPermaLink="false">http://scribble.kai-studios.com/?p=91</guid>
		<description><![CDATA[
A few days ago, I posted about different tween engines and Doris requested that I post more about GTween,so here we are, with my first real tutorial on this blog about GTween. Basically, it&#8217;s just a basic setup to showcase how GTween can be used, and how you would write the code for tweenings. Make [...]]]></description>
			<content:encoded><![CDATA[<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="250" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://scribble.kai-studios.com/swf/gTweenExample.swf" /><embed type="application/x-shockwave-flash" width="480" height="250" src="http://scribble.kai-studios.com/swf/gTweenExample.swf"></embed></object></p>
<p>A few days ago, I posted about different tween engines and <em>Doris</em> requested that I post more about GTween,so here we are, with my first real tutorial on this blog about GTween. Basically, it&#8217;s just a basic setup to showcase how GTween can be used, and how you would write the code for tweenings. Make sure you download the class <a title="GTween" href="http://www.gskinner.com/libraries/gtween/" target="_blank">here</a>.</p>
<p>The above example shows two circles with one &#8220;follower&#8221; and one &#8220;reverser&#8221;. They function just like how they&#8217;re being named! I would expect that you already know the basics of Actionscript 3 and Event LIstener and I wouldn&#8217;t be going through on those.</p>
<p>Here&#8217;s the code:</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>gskinner<span style="color: #000066; font-weight: bold;">.</span>motion<span style="color: #000066; font-weight: bold;">.</span>GTween<span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #0033ff; font-weight: bold;">import</span> fl<span style="color: #000066; font-weight: bold;">.</span>motion<span style="color: #000066; font-weight: bold;">.</span>easing<span style="color: #000066; font-weight: bold;">.*;</span>
&nbsp;
<span style="color: #6699cc; font-weight: bold;">var</span> tween<span style="color: #000066; font-weight: bold;">:</span>GTween<span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #6699cc; font-weight: bold;">var</span> reversed<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Boolean</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">MouseEvent</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">CLICK</span><span style="color: #000066; font-weight: bold;">,</span> reposition<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000066; font-weight: bold;">,</span> 0<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
<span style="color: #339966; font-weight: bold;">function</span> reposition<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>
     <span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">removeEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">MouseEvent</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">CLICK</span><span style="color: #000066; font-weight: bold;">,</span> reposition<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
     reversed = <span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000066; font-weight: bold;">;</span>
     tween = <span style="color: #0033ff; font-weight: bold;">new</span> GTween<span style="color: #000000;">&#40;</span>click_txt<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000066; font-weight: bold;">.</span>3<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000;">&#123;</span><span style="color: #004993;">alpha</span><span style="color: #000066; font-weight: bold;">:</span>0<span style="color: #000000;">&#125;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000;">&#123;</span>ease<span style="color: #000066; font-weight: bold;">:</span>Quadratic<span style="color: #000066; font-weight: bold;">.</span>easeIn<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
     tween = <span style="color: #0033ff; font-weight: bold;">new</span> GTween<span style="color: #000000;">&#40;</span>follower<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000066; font-weight: bold;">.</span>6<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000;">&#123;</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">mouseX</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">y</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">mouseY</span><span style="color: #000000;">&#125;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000;">&#123;</span>ease<span style="color: #000066; font-weight: bold;">:</span>Quadratic<span style="color: #000066; font-weight: bold;">.</span>easeOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
     tween = <span style="color: #0033ff; font-weight: bold;">new</span> GTween<span style="color: #000000;">&#40;</span>reverser<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000066; font-weight: bold;">.</span>6<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000;">&#123;</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">mouseX</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">y</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">mouseY</span><span style="color: #000000;">&#125;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000;">&#123;</span>ease<span style="color: #000066; font-weight: bold;">:</span>Quadratic<span style="color: #000066; font-weight: bold;">.</span>easeOut<span style="color: #000066; font-weight: bold;">,</span> autoReverse<span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">,</span> completeListener<span style="color: #000066; font-weight: bold;">:</span>handleComplete<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #339966; font-weight: bold;">function</span> handleComplete<span style="color: #000000;">&#40;</span>e<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
     <span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>reversed<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
          tween<span style="color: #000066; font-weight: bold;">.</span>autoReverse = <span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000066; font-weight: bold;">;</span>
          <span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">MouseEvent</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">CLICK</span><span style="color: #000066; font-weight: bold;">,</span> reposition<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000066; font-weight: bold;">,</span> 0<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
           tween = <span style="color: #0033ff; font-weight: bold;">new</span> GTween<span style="color: #000000;">&#40;</span>click_txt<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000066; font-weight: bold;">.</span>3<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000;">&#123;</span><span style="color: #004993;">alpha</span><span style="color: #000066; font-weight: bold;">:</span>1<span style="color: #000000;">&#125;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000;">&#123;</span>ease<span style="color: #000066; font-weight: bold;">:</span>Quadratic<span style="color: #000066; font-weight: bold;">.</span>easeOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
     <span style="color: #000000;">&#125;</span>
     reversed = <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>There are three movieclips on stage: follower, reverser and click_txt. The code is pretty straightforward and I&#8217;m going to go through what it means.</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>gskinner<span style="color: #000066; font-weight: bold;">.</span>motion<span style="color: #000066; font-weight: bold;">.</span>GTween<span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #0033ff; font-weight: bold;">import</span> fl<span style="color: #000066; font-weight: bold;">.</span>motion<span style="color: #000066; font-weight: bold;">.</span>easing<span style="color: #000066; font-weight: bold;">.*;</span></pre></div></div>

<p>The first line is the import for GTween class and the second line is to import Flash extended easing class that will be used for adding easing to GTween.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #339966; font-weight: bold;">function</span> reposition<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>
     <span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">removeEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">MouseEvent</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">CLICK</span><span style="color: #000066; font-weight: bold;">,</span> reposition<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
     reversed = <span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000066; font-weight: bold;">;</span>
     tween = <span style="color: #0033ff; font-weight: bold;">new</span> GTween<span style="color: #000000;">&#40;</span>click_txt<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000066; font-weight: bold;">.</span>3<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000;">&#123;</span><span style="color: #004993;">alpha</span><span style="color: #000066; font-weight: bold;">:</span>0<span style="color: #000000;">&#125;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000;">&#123;</span>ease<span style="color: #000066; font-weight: bold;">:</span>Quadratic<span style="color: #000066; font-weight: bold;">.</span>easeIn<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
     tween = <span style="color: #0033ff; font-weight: bold;">new</span> GTween<span style="color: #000000;">&#40;</span>follower<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000066; font-weight: bold;">.</span>6<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000;">&#123;</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">mouseX</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">y</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">mouseY</span><span style="color: #000000;">&#125;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000;">&#123;</span>ease<span style="color: #000066; font-weight: bold;">:</span>Quadratic<span style="color: #000066; font-weight: bold;">.</span>easeOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
     tween = <span style="color: #0033ff; font-weight: bold;">new</span> GTween<span style="color: #000000;">&#40;</span>reverser<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000066; font-weight: bold;">.</span>6<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000;">&#123;</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">mouseX</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">y</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">mouseY</span><span style="color: #000000;">&#125;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000;">&#123;</span>ease<span style="color: #000066; font-weight: bold;">:</span>Quadratic<span style="color: #000066; font-weight: bold;">.</span>easeOut<span style="color: #000066; font-weight: bold;">,</span> autoReverse<span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">,</span> completeListener<span style="color: #000066; font-weight: bold;">:</span>handleComplete<span style="color: #000000;">&#125;</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>The reposition is our main function, we set the <em>reversed</em> boolean to false whenever the user clicks as the reverser has not reversed yet. The next 3 lines show the GTween with its first property being the movieclip it&#8217;s tweening, second as the time it&#8217;ll take to tween, the third will be an object that holds each property you want to tween, and the fourth is another set of object for easings, event listeners and other extra controls (in this case, I have used the autoReverse property). And you&#8217;ll see that I added a completeListener where it will run the handleComplete when the tween completes.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #339966; font-weight: bold;">function</span> handleComplete<span style="color: #000000;">&#40;</span>e<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
     <span style="color: #0033ff; font-weight: bold;">if</span> <span style="color: #000000;">&#40;</span>reversed<span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
          tween<span style="color: #000066; font-weight: bold;">.</span>autoReverse = <span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000066; font-weight: bold;">;</span>
          <span style="color: #004993;">stage</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">MouseEvent</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">CLICK</span><span style="color: #000066; font-weight: bold;">,</span> reposition<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000066; font-weight: bold;">,</span> 0<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
          tween = <span style="color: #0033ff; font-weight: bold;">new</span> GTween<span style="color: #000000;">&#40;</span>click_txt<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000066; font-weight: bold;">.</span>3<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000;">&#123;</span><span style="color: #004993;">alpha</span><span style="color: #000066; font-weight: bold;">:</span>1<span style="color: #000000;">&#125;</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000;">&#123;</span>ease<span style="color: #000066; font-weight: bold;">:</span>Quadratic<span style="color: #000066; font-weight: bold;">.</span>easeOut<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
     <span style="color: #000000;">&#125;</span>
     reversed = <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>The handleComplete function will run when the tween completes, so for our case, it will run before it is being reversed, which is why I added a boolean to track it, it will check if it has reversed to its position, if not, it will set it to true, and the next time the handleComplete runs again, it will run the <em>if function </em>where I then set the autoReverse property to false, and add the mouse click listener again.</p>
<p>So as you can see, GTween is no harder than any other tweening engines and it does give you alot of controls. Play around with it for now and I&#8217;ll be posting another advanced tutorial on GTween in a few days.</p>
]]></content:encoded>
			<wfw:commentRss>http://scribble.kai-studios.com/2009/01/17/gtween-basics/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Life at Hybrid</title>
		<link>http://scribble.kai-studios.com/2009/01/15/life-at-hybrid/</link>
		<comments>http://scribble.kai-studios.com/2009/01/15/life-at-hybrid/#comments</comments>
		<pubDate>Fri, 16 Jan 2009 07:28:22 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
		
		<category><![CDATA[Life]]></category>

		<category><![CDATA[Hybrid Studio]]></category>

		<category><![CDATA[korean]]></category>

		<category><![CDATA[movie]]></category>

		<category><![CDATA[Oldboy]]></category>

		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://scribble.kai-studios.com/?p=82</guid>
		<description><![CDATA[Sorry that I haven&#8217;t been posting in a while. Just wanted to keep you all updated with my life. I haven&#8217;t been able to blog for the past few days as I just started my new job at Hybrid Studio this week and it&#8217;s been keeping me busy, but in a good way! I felt [...]]]></description>
			<content:encoded><![CDATA[<p>Sorry that I haven&#8217;t been posting in a while. Just wanted to keep you all updated with my life. I haven&#8217;t been able to blog for the past few days as I just started my new job at <a title="Hybrid Studio" href="http://www.hybridstudio.com/" target="_blank">Hybrid Studio</a> this week and it&#8217;s been keeping me busy, but in a good way! I felt that my life has been enriched, and I&#8217;m already loving my job, the people, and environment on my 4th day of work. Life at Hybrid is so full, you&#8217;re constantly working and time passes by without realizing, which is totally good. And it does feel good to be surrounded by lots of talents, I&#8217;m sure this will be an interesting journal and I&#8217;ll be able to learn and grow along the way.</p>
<p>Apart from working on some big upcoming movie websites, we also had a movie night on Tuesday after work where a few of us were watching a Korean movie in the conference room. <a title="Oldboy" href="http://www.imdb.com/title/tt0364569/" target="_blank">Oldboy</a> is a really good movie, one of the best plots I&#8217;ve ever seen, and it&#8217;s highly recommended, a must watch if you haven&#8217;t. The movie is based around a guy who was imprisoned for 15 years and being released one day, so the 2 hours long movie then circulates around him trying to figure out who imprisoned him, and why do they imprisoned him, and then seeking revenge. Thanks to my co-worker, Tony, who brought in this movie. We&#8217;ll probably do more Movie Nights in the future, with pizzas and beers!</p>
<p>Alright, I&#8217;m just here to keep ya&#8217;ll posted about what&#8217;s going on in my life. I should be posting more about actionscript this weekend, so check back soon <img src='http://scribble.kai-studios.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://scribble.kai-studios.com/2009/01/15/life-at-hybrid/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Scribble Scrabble&#8217;s on Iphone</title>
		<link>http://scribble.kai-studios.com/2009/01/15/scribble-scrabbles-on-iphone/</link>
		<comments>http://scribble.kai-studios.com/2009/01/15/scribble-scrabbles-on-iphone/#comments</comments>
		<pubDate>Fri, 16 Jan 2009 07:24:03 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
		
		<category><![CDATA[News]]></category>

		<category><![CDATA[blog]]></category>

		<category><![CDATA[iPhone]]></category>

		<category><![CDATA[mobile]]></category>

		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://scribble.kai-studios.com/?p=79</guid>
		<description><![CDATA[
So my friend David sent me this plugin, iWPhone, which is a one-click install to your wordpress, where if a user surf your blog with his/her iPhone, it will automatically format your blog for iPhone as you can see on the screenshot above. It&#8217;s pretty cool as it saves you from having to design a [...]]]></description>
			<content:encoded><![CDATA[<p><a class="imagelink" href="http://iwphone.contentrobot.com/" target="_blank"><img class="aligncenter size-medium wp-image-80" title="iphone" src="http://scribble.kai-studios.com/wp-content/uploads/2009/01/iphone-300x250.jpg" alt="" width="300" height="250" /></a></p>
<p>So my friend <a title="David Nordlundh" href="http://www.davd.se/" target="_blank">David</a> sent me this plugin, <a title="iWPhone" href="http://iwphone.contentrobot.com/" target="_blank">iWPhone</a>, which is a one-click install to your wordpress, where if a user surf your blog with his/her iPhone, it will automatically format your blog for iPhone as you can see on the screenshot above. It&#8217;s pretty cool as it saves you from having to design a mobile version for your blog, and it&#8217;ll only take you 5 minutes to get it installed. So if you have a blog, you should do it right away!</p>
]]></content:encoded>
			<wfw:commentRss>http://scribble.kai-studios.com/2009/01/15/scribble-scrabbles-on-iphone/feed/</wfw:commentRss>
		</item>
		<item>
		<title>What&#8217;s the best tween engine?</title>
		<link>http://scribble.kai-studios.com/2009/01/11/whats-the-best-tween-engine/</link>
		<comments>http://scribble.kai-studios.com/2009/01/11/whats-the-best-tween-engine/#comments</comments>
		<pubDate>Mon, 12 Jan 2009 05:36:06 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
		
		<category><![CDATA[Flash]]></category>

		<category><![CDATA[grant skinner]]></category>

		<category><![CDATA[gtween]]></category>

		<category><![CDATA[mc tween]]></category>

		<category><![CDATA[neoganda]]></category>

		<category><![CDATA[speed test]]></category>

		<category><![CDATA[Tween]]></category>

		<category><![CDATA[tweener]]></category>

		<category><![CDATA[tweenlite]]></category>

		<category><![CDATA[tweenmax]]></category>

		<category><![CDATA[zeh fernando]]></category>

		<guid isPermaLink="false">http://scribble.kai-studios.com/?p=70</guid>
		<description><![CDATA[I&#8217;m going to kick start my blog about Flash with the question that people asked me most of the time. Which tween engine should I use? I would say it&#8217;s going to be based on your own preference when it comes down to this. With Actionscript 3, the one that I used most of the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m going to kick start my blog about Flash with the question that people asked me most of the time. Which tween engine should I use? I would say it&#8217;s going to be based on your own preference when it comes down to this. With Actionscript 3, the one that I used most of the time will be <a title="Tweener" href="http://code.google.com/p/tweener/" target="_blank">Tweener</a>. It allows you to tween different sets of properties in one single line, such as:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;">Tweener<span style="color: #000066; font-weight: bold;">.</span>addTween<span style="color: #000000;">&#40;</span>mc<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000;">&#123;</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">:</span>250<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">y</span><span style="color: #000066; font-weight: bold;">:</span>250<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">alpha</span><span style="color: #000066; font-weight: bold;">:</span> <span style="color: #000066; font-weight: bold;">.</span>5<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">time</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000066; font-weight: bold;">,</span> transition<span style="color: #000066; font-weight: bold;">:</span><span style="color: #990000;">&quot;easeInOutQuad&quot;</span><span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

<p>However, while I was working back at <a title="Neoganda" href="http://www.neoganda.com" target="_blank">Neoganda</a>, we worked mostly in AS2, therefore I was introduced with <a title="MC Tween" href="http://hosted.zeh.com.br/mctween/" target="_blank">MC Tween</a>, which is also developed by Zeh Fernando, who&#8217;s also the man behind Tweener. MC Tween is not a class file, so, all you need to do is just #include the as file on your first frame and you would never need to import it anymore. It is pretty simple to be called upon as it adds on properties to all the display objects. Instead of writing all the properties in one line like Tweener, this is how you would write to move the y position of an object.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;">mc<span style="color: #000066; font-weight: bold;">.</span>yTo = <span style="color: #000000; font-weight:bold;">250</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

<p>Pretty straightforward eh? Recently, I&#8217;ve moved on to use <a title="GTween" href="http://www.gskinner.com/libraries/gtween/" target="_blank">GTween</a> by <a title="Grant Skinner" href="http://www.gskinner.com/blog/" target="_blank">Grant Skinner</a>. It is still currently at its beta phase, but it is already looking really promising. GTween is built to be fast and small. It is also and Object Oriented Tween Engine that will best suits developers with its flexibility. How you would create this tween is by writing:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #6699cc; font-weight: bold;">var</span> myTween<span style="color: #000066; font-weight: bold;">:</span>GTween = <span style="color: #0033ff; font-weight: bold;">new</span> GTween<span style="color: #000000;">&#40;</span>mc<span style="color: #000066; font-weight: bold;">,</span> 1<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000000;">&#123;</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">:</span>250<span style="color: #000000;">&#125;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span></pre></div></div>

<p>So you could then add event listeners to these tween to listen for onComplete events or such.</p>
<p>So as you can see, there&#8217;s a wide list of Tween enines that you could use, or you could even write your own tweens from scratch. These list of Tween engines are here as an option to make your life easier. I&#8217;ve came across this article a while ago, &#8220;<a title="Speed Test" href="http://blog.greensock.com/tweening-speed-test/" target="_self">Speed Test - Tween Engine Comparison Tool</a>&#8221; that shows you the performance of different tween engines, apparently tweener is running really slow with <a title="TweenLite" href="http://blog.greensock.com/tweenliteas3/" target="_blank">TweenLite</a>/<a title="TweenMax" href="http://blog.greensock.com/tweenmaxas3/" target="_blank">TweenMax </a>leading with its fast performance. However, it is also one of the tween engines that I haven&#8217;t get my hands on. Guess I&#8217;ll be looking into it and probably write a short tutorial and feedback about it a few days later. So for now, go hop on to it and run the test yourself so you could decide which suits you the most.</p>
<p>No matter which one you decide to use, the way to use and write them wouldn&#8217;t be that big of a difference. Therefore it wouldn&#8217;t be hard for you to hop on a new engine if you&#8217;re working on someone&#8217;s file who is using the other tween engine. So no worries on that and happy tweening.</p>
]]></content:encoded>
			<wfw:commentRss>http://scribble.kai-studios.com/2009/01/11/whats-the-best-tween-engine/feed/</wfw:commentRss>
		</item>
		<item>
		<title>What&#8217;s more to celebrate than with a free whopper?</title>
		<link>http://scribble.kai-studios.com/2009/01/10/whats-more-to-celebrate-than-with-a-free-whopper/</link>
		<comments>http://scribble.kai-studios.com/2009/01/10/whats-more-to-celebrate-than-with-a-free-whopper/#comments</comments>
		<pubDate>Sat, 10 Jan 2009 21:03:33 +0000</pubDate>
		<dc:creator>Kai</dc:creator>
		
		<category><![CDATA[Campaign]]></category>

		<category><![CDATA[application]]></category>

		<category><![CDATA[burger]]></category>

		<category><![CDATA[facebook]]></category>

		<category><![CDATA[free]]></category>

		<guid isPermaLink="false">http://scribble.kai-studios.com/?p=61</guid>
		<description><![CDATA[
So what is more to celebrate a new blog than with a free whopper? Burger King has recently launched a hilarious campaign on facebook. This campaign is called &#8220;Whopper Sacrifice&#8221; and it is somehow a test to see how far a person would go to get a free whopper. Basically what you would need to [...]]]></description>
			<content:encoded><![CDATA[<p><a class="imagelink" href="http://www.whoppersacrifice.com/" target="_blank"><img title="Whopper Sacrifice" src="http://scribble.kai-studios.com/images/whopper.jpg" alt="Whopper Sacrifice" width="480" height="320" /></a></p>
<p>So what is more to celebrate a new blog than with a free whopper? Burger King has recently launched a hilarious campaign on facebook. This campaign is called &#8220;<a title="Whopper Sacrifice" href="http://www.whoppersacrifice.com/" target="_blank">Whopper Sacrifice</a>&#8221; and it is somehow a test to see how far a person would go to get a free whopper. Basically what you would need to do is to delete 10 friends from your facebook in exchange for a free whopper. Once you&#8217;ve &#8217;sacrificed&#8217; a friend, there will be a post on your profile saying that you have sacrificed so and so for a free whopper and there is no way for you to remove that posting, lol.</p>
<p>It is possibly one of the best campaign I&#8217;ve ever seen on facebook. Now that I&#8217;ve posted this, I wonder how many of my friends will sacrifice me for a free whopper&#8230;</p>
<p>I promise my next post will be Flash/Actionscript related as planned&#8230;however there is a reason for this post as well. Facebook has been growing strong with the implementation of its applications, and although there are alot of applications that basically does nothing, it has still grown a popularity among users. I am actually working on a facebook application as well so I&#8217;ll be posting a tutorial about how you could implement Flash content into a facebook application some time in the future.</p>
<p>So let&#8217;s start sacrificing your friends now for a <a title="Whopper Sacrifice" href="http://www.whoppersacrifice.com/" target="_blank">free whopper</a>!</p>
<p><em>Update: Facebook has disabled the campaign. 233,906 friendships were sacrificed for free whoppers, good job. For those who have been sacrificed, time for some <a title="Angry-Gram" href="http://www.angry-gram.com/index.php" target="_blank">revenge</a><br />
</em></p>
]]></content:encoded>
			<wfw:commentRss>http://scribble.kai-studios.com/2009/01/10/whats-more-to-celebrate-than-with-a-free-whopper/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
